We recommend not applying filter on epoched data, as the epochs edges
generate important artifacts. Instead, you can apply filters on the raw
data using raw.filter()
If you really want to apply in on epochs data, you can retrieve the data
array, and pass it to mne.filter functions: e.g.
thanks for your response. The problem is that the format of my raw data is
not available in mne python and for this reason I created a 3d array for my
epochs. So I don't have raw data.
onset = [1] # also tried [1 + raw.first_samp]
dur = [5]
raw.annotations = mne.Annotations(onset, dur, 'bad')
raw.plot() # here comes the error
The raw file here is fif. I saved an edf using raw.save, cutting parts
from the beginning and the end of the recording. In the edf file there
is no error.
For me it now says that the name 'int32' is not defined. When I
exclude the dtype parameter, I get no error when plotting. But now
I also don't see any annotations in the plot.
For me it now says that the name 'int32' is not defined.
You might have to do np,int32 then.
Mainak
When I
exclude the dtype parameter, I get no error when plotting. But now
I also don't see any annotations in the plot.
Quoting Mainak Jas <mainakjas at gmail.com>:
> okay. There seems to be some problem with the date in your measurement
info.
>
> This should fix it:
>
> raw.info['meas_date'] = np.array([1463353331, 0], dtype=int32)
>
> Let us know if you still get the error after that.
>
> Mainak
>
>
>> Hello,
>>
>> I get:
>> array([1463353331])
>>
>> Nico
>>
>>
>> Quoting Mainak Jas <mainakjas at gmail.com>:
>>
>> > Hi Nico,
>> >
>> > Before we try to debug any further, can you let us know what
>> > raw.info['meas_date']
>> > looks like in your data?
>> >
>> > Mainak
>> >
>> >
>> >> Hello,
>> >>
>> >> can someone tell me what the problem might be here? When trying to
>> >> plot annotations, I get an IndexError in the file annotations.py:
>> >>
>> >> --> 122 meas_date = meas_date[0] + meas_date[1] / 1000000.
>> >>
>> >> My commands are:
>> >>
>> >> onset = [1] # also tried [1 + raw.first_samp]
>> >> dur = [5]
>> >> raw.annotations = mne.Annotations(onset, dur, 'bad')
>> >> raw.plot() # here comes the error
>> >>
>> >> The raw file here is fif. I saved an edf using raw.save, cutting
parts
>> >> from the beginning and the end of the recording. In the edf file
there
>> >> is no error.
>> >>
>> >> Thanks,
>> >> Nico
>> >>
>> >> _______________________________________________
>> >> Mne_analysis mailing list
>> >> Mne_analysis at nmr.mgh.harvard.edu
>> >> Mne_analysis Info Page
>> >>
>> >>
>> >> The information in this e-mail is intended only for the person to
whom
>> it
>> >> is
>> >> addressed. If you believe this e-mail was sent to you in error and
the
>> >> e-mail
>> >> contains patient information, please contact the Partners Compliance
>> >> HelpLine at
>> >> MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to
you
>> in
>> >> error
>> >> but does not contain patient information, please contact the sender
and
>> >> properly
>> >> dispose of the e-mail.
>> >>
>> >>
>>
>>
>>
>> _______________________________________________
>> Mne_analysis mailing list
>> Mne_analysis at nmr.mgh.harvard.edu
>> Mne_analysis Info Page
>>
_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu Mne_analysis Info Page
Fantastic, it works. Thanks a lot for the help and support!
Another issue unrelated to annotations: When I choose two channels and
plot them, the second channel looks actually exactly like a mirrored
version of the first. But it seems that it is only plotting and only
when I pick 2 channels, not 3 or another number. This is my code:
raw = mne.io.read_raw_fif(path+fname, preload=True)
ch = ['F3','F4']
raw.pick_channels(ch)
raw.plot() # 2nd channel looks exactly mirrored
# I think it is an issue of plotting, not on the data-level:
probe1 = raw[0][0][0][0] + raw[1][0][0][0]
probe2 = raw[0][0][0][10] + raw[1][0][0][10]
print(probe1 - probe2) # not zero
This is not urgent, but I'm curious if this is a known issue.