Hi everyone,
I’m using the epochs.drop_plot_log() function to see if some of my epochs were dropped because of bad channels (and indeed they are).
epochs = mne.Epochs(reref, events=allevents, event_id=eventsdict, tmin=tmin, tmax=tmax, on_missing='warn', reject=reject_criteria, preload=True, baseline=None, reject_by_annotation=True)
epochs.plot_drop_log().savefig(os.path.join(epochsdir, f"epochs drop log {subject}.png"))
Then i used to enter the bad channels manually like so:
badsCHs = input("enter bad channels...").split(sep=',')
if len(badsCHs[0]) > 0:
reref.info['bads'].extend(badsCHs)
Actually this is slow, and i know that i just say that bad channels are the ones that caused at least 5% of my epochs to be removed. So i want to do it automatically, but i can’t figure out where is this info stored. The plot_crop_log() function obviously makes use of exactly this, but i don’t understand where it is and how to access it I looked at the .drop_log, but then i guess i should do the stats myself? But surely in order to plot them, this is already available somewhere, i don’t need to compute them again…?
Your help/ advice much appreciated
bissera