sappelhoff / pyprep

A Python implementation of the Preprocessing Pipeline (PREP) for EEG data
https://pyprep.readthedocs.io/en/latest/
MIT License
128 stars 30 forks source link

Issue with RawBrainVision #127

Closed Sam54000 closed 1 year ago

Sam54000 commented 1 year ago

Hi, thank you for this amazing pipeline which works well with mne. I have an issue though, I am working with mne-bids and my files are converted into BrainVision format. Therefore when I read back my files and try to run PrepPipeline I run into an error

find_noisy_channels.py", line 92, in __init__
    self.n_samples = raw._data.shape[1]
AttributeError: 'RawBrainVision' object has no attribute '_data'

I might found a walkaround by doing raw._data = raw.get_data() but I don't think it is a sustainable solution. Someone have any idea?

sappelhoff commented 1 year ago

Hi, thanks for the report. I am really surprised that the _data attribute is not available. I also wonder how mne-bids could have an impact on this. Can you replicate this problem in a minimal working example? Preferably using a file available from mne (e.g., "sample")

sappelhoff commented 1 year ago

Can you also share some more of the code you use? Also, is your raw object "preloaded" (see https://mne.tools/stable/generated/mne.io.Raw.html) before you pass it to pyprep?