Hi,
I have 5 subjects and 4 tasks. The data is in bids format. I am using following code to read data:
task = ['AUDI','LEC2', 'MOTO', 'MVIS']
subject = ['071','073','076','077', '079']
suffix= 'ieeg'
raw = {}
for tsk in task:
for sub in subject:
bids_path = BIDSPath(subject=sub, task=tsk, acquisition = 'f8f24ds8sm0', suffix=suffix, root='iEEG_data_sample')
raw[(tsk,sub)] = read_raw_bids(bids_path=bids_path, verbose=False)
I am using the following code to find PSD for each raw data object:
psds_df = {}
for key, val in raw.items():
psds, freqs = mne.time_frequency.psd_multitaper(val, low_bias=True)
psds_df[key] = pd.DataFrame(psds.T, index=pd.Index(np.round(freqs, 2), name="frequencies"), columns=val.ch_names)
If I see the dataframe for (“AUDI”, “071”), I get the following dataframe:
Thanks for the help.
- MNE version: e.g. 0.24.0
- operating system: Windows 11