Преглед изворни кода

record total chs interpolated

Jack пре 1 недеља
родитељ
комит
3a32e46a35
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2 0
      02_preprocessing.py

+ 2 - 0
02_preprocessing.py

@@ -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