Continuous data analysis


I designed my data collection in the way that participants didn’t need to do any task, therefore, my data doesn’t have any event (I have about 4 minutes continuous data collected in each file). My aim is to measure power for each EEG frequency band during this 4 minutes . I have several questions:

  1. Since I don’t have any events and I want the power for the frequency bands for the all 4 minutes, I think I don’t need to epoch the data. Please correct me if I’m wrong.

  2. I tried to do baseline correction before running ICA using mne.baseline.rescale() but I received the following error

AttributeError Traceback (most recent call last)
----> 1 mne.baseline.rescale(notched_filt_raw,350 , (None,None), mode=‘mean’, copy=True)

in rescale(data, times, baseline, mode, copy, picks, verbose)

~\Anaconda3\envs\mne\lib\site-packages\mne\ in rescale(data, times, baseline, mode, copy, picks, verbose)
65 msg = _log_rescale(baseline, mode)
—> 67 if baseline is None or data.shape[-1] == 0:
68 return data

AttributeError: ‘RawEDF’ object has no attribute ‘shape’

Can you please help me how to solve this error?

  1. I went through the tutorial and found some functions to calculate power for each frequency band and found some functions such as psd_multitaper() and psd_welch(). But all the functions that I’ve found are for epoched data, can you please let me know how can I do that for continuous data.

Thank you,

mne.baseline.rescale() operates on NumPy arrays, not on Raw objects. That is why you get the error “RawEDF object has no attribute shape”. So if you want to ensure the entire 4-minute file is zero-mean in each channel, you could do raw.get_data() and then mne.baseline.rescale() on the resulting array and then construct a new RawArray with the baselined data and the info from the original Raw.

Thank you Dan for your help. I followed what you suggested and it is working properly now. Thank you for that.

Can you please help me with the third question as well? How can I find the power for the frequency bands for the continuous data (without epoching)?