[Mne_analysis] error filtering biosemi imported file

Alexandre Gramfort alexandre.gramfort at telecom-paristech.fr
Wed Jan 15 03:19:35 EST 2014
Search archives:

hi,

yes please share the file.

Just to make sure did you type:

raw = read_raw_edf('bdf_file.bdf', hpts = 'hpts_file.hpts', preload = 'True')

or

raw = read_raw_edf('bdf_file.bdf', hpts = 'hpts_file.hpts', preload = True)

?

ie. without the '' around the True.

the later is the good way.

Alex



On Wed, Jan 15, 2014 at 12:00 AM, Eric Larson <larson.eric.d at gmail.com> wrote:
> Hey Mauricio,
>
> This sounds like it might be an issue with our preloading routines. If you
> can upload a sample EDF file and start an issue on Github with a minimum
> example (it looks like those lines would be it) of the problem, we can work
> out a solution:
>
> https://github.com/mne-tools/mne-python/issues?state=open
>
> Thanks,
> Eric
>
>
>
> On Tue, Jan 14, 2014 at 2:56 PM, Mauricio Aspé Sánchez
> <mauricio.aspe.s at gmail.com> wrote:
>>
>> Thanks Eric,
>> do I have to type something like this?
>>
>> raw = read_raw_edf('bdf_file.bdf', hpts = 'hpts_file.hpts')
>> raw.filter(30, 1)
>>
>> in that case, I have to use
>> raw = read_raw_edf('bdf_file.bdf', hpts = 'hpts_file.hpts', preload =
>> 'True')
>>
>> Isn't it? But it's strange because when I read the bdf with preload =
>> 'True' I don't know if the program crushes or it will take a lot of time
>> (I'm loading a 128 channels 50 min EEG on a PC with 8 GB RAM and two 3.4 GHz
>> processors... it takes to EEGLab just 3 min). I waited for 1 hr and the bdf
>> didn't load.
>>
>> All the best,
>> Mauricio.
>>
>>
>> 2014/1/14 Eric Larson <larson.eric.d at gmail.com>
>>>
>>> Hey Mauricio,
>>>
>>> You should be able to do "raw.filter(...) " directly on the Raw instance
>>> (as a method of Raw). Does that make sense?
>>>
>>>
>>> http://martinos.org/mne/stable/generated/mne.fiff.Raw.html#mne.fiff.Raw.filter
>>>
>>> Eric
>>>
>>>
>>>
>>> On Tue, Jan 14, 2014 at 2:12 PM, Mauricio Aspé Sánchez
>>> <mauricio.aspe.s at gmail.com> wrote:
>>>>
>>>> Hi everybody,
>>>> I'm working with some biosemi EEG files
>>>>
>>>> the following code:
>>>>
>>>> raw = read_raw_edf('bdf_file.bdf', hpts = 'hpts_file.hpts')
>>>> fraw = filter.band_pass_filter(raw, 1024, 30, 1)
>>>>
>>>> gives me the error:
>>>>
>>>> Traceback (most recent call last):
>>>>   File
>>>> "C:\Users\Mauricio\Documents\Dropbox\PhD\scripts\mne-python\preprocessing.py",
>>>> line 9, in <module>
>>>>     fraw = filter.band_pass_filter(raw, 1024, 30, 1)
>>>>   File "<string>", line 2, in band_pass_filter
>>>>   File
>>>> "C:\Python33\lib\site-packages\mne-0.8.git-py3.3.egg\mne\utils.py", line
>>>> 387, in verbose
>>>>     ret = function(*args, **kwargs)
>>>>   File
>>>> "C:\Python33\lib\site-packages\mne-0.8.git-py3.3.egg\mne\filter.py", line
>>>> 624, in band_pass_filter
>>>>     xf = _filter(x, Fs, freq, gain, filter_length, picks, n_jobs, copy)
>>>>   File
>>>> "C:\Python33\lib\site-packages\mne-0.8.git-py3.3.egg\mne\filter.py", line
>>>> 276, in _filter
>>>>     x, orig_shape, picks = _prep_for_filtering(x, copy, picks)
>>>>   File
>>>> "C:\Python33\lib\site-packages\mne-0.8.git-py3.3.egg\mne\filter.py", line
>>>> 226, in _prep_for_filtering
>>>>     orig_shape = x.shape
>>>> AttributeError: 'RawEDF' object has no attribute 'shape'
>>>>
>>>> Could somebody tell me what I'm doing wrong?
>>>> What is the right pipeline importing and filtering .bdf files?
>>>>
>>>> All the best,
>>>> Mauricio.
>>>>
>>>> _______________________________________________
>>>> Mne_analysis mailing list
>>>> Mne_analysis at nmr.mgh.harvard.edu
>>>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>>>>
>>>>
>>>> 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
>>>> http://www.partners.org/complianceline . 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
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
>
> 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
> http://www.partners.org/complianceline . 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.
>




More information about the Mne_analysis mailing list