|
@@ -133,6 +133,7 @@ for i, p_row in p_list.iterrows():
|
|
|
|
|
|
# interpolate bad channels (spherical spline method) to avoid biasing average reference
|
|
|
print('Interpolating electrodes: ', raw.info['bads'])
|
|
|
+ n_chs_interpolated = len(raw.info['bads'])
|
|
|
raw = raw.interpolate_bads(method={'eeg': 'spline'})
|
|
|
# raw.plot()
|
|
|
|
|
@@ -261,6 +262,7 @@ for i, p_row in p_list.iterrows():
|
|
|
subj_metadata['n_epochs'] = len(epochs_nt)
|
|
|
subj_metadata['n_epochs_excluded'] = 750 - len(epochs_nt)
|
|
|
subj_metadata['n_extra_chans_excluded'] = len(new_chs_to_interp)
|
|
|
+ subj_metadata['n_total_chans_interpolated'] = n_chs_interpolated
|
|
|
subj_metadata['n_preprocessing_attempts'] = n_attempts
|
|
|
|
|
|
# save epochs object
|