Baseline correction of misc channel

:question: If you have a question or issue with MNE-Python, please include the following info:

  • MNE version: 1.5.0
  • operating systemWindows 10

Dear colliges,
i have faced a problem with baseline correction of electric dermal activity which was written in misc channel. Neither baseline correction via .apply_baseline(), nor via epochs = mne.Epochs(for_scr, events_clean, picks=[‘MISC001’], event_id = event_id, tmin=-5.94, tmax=0, baseline=(-5.94, -3.94), preload = True, reject_by_annotation = True, on_missing=‘ignore’, event_repeated= ‘drop’) seems to work properly. Plots of baselined epochs and initial are identical. could you please provide some advices how to overcome this issue.
Thanks!

It’s likely that the EDA is not considered as a “data channel” by these methods. I guess we
can consider this a bug. Can you open a issue on github for this with some code snippet to replicate the issue?

thanks
Alex

cc @scott-huberty who has recently thought about this issue for eyetracking channels. He might already have a work-in-progress fix going?

this issue was solved by changing channel type to data channel:
for_scr.set_channel_types({‘MISC001’: ‘eeg’})

1 Like

Hmm, actually, baseline correction works fine with eyetrack channels (for example see the tutorial).

Which is nice because I do occasionally want to baseline correct pupil size data… But maybe technically baseline correction shouldn’t apply to eyetrack channels?

FYI I think apply_baseline excludes misc / stim / gsr etc at this line, which eventually calls _PICK_TYPES_DATA_DICT:

Maybe instead, apply_baseline could have a picks parameter which by default has the current behaviour, but let’s a user specifically pick other channels, for example if they are analyzing galvanic skin response data?

Ah right I forgot that we added a new data channel type for eyetrack (they’re not misc).

Reclassifying them as EEG is a good workaround, but maybe we should have a larger discussion among devs about how to handle this going forward.

seconding this!
I’m working with misc (Accelerometer data) and EMG channels, I’m trying to apply_baseline only to the EMG channel without much luck
I tried a workaround: create two objects by picking the EMG channel, then applying baseline and merging it with the original data again without much luck

epochs_emg = epochs.copy().pick(picks=['EMG'])
epochs_emg.apply_baseline(baseline=(None,None))
epochs_emg_acc = epochs_emg.add_channels(epochs.copy().pick(picks=["ACC_X","ACC_Y","ACC_Z"]))
epochs_emg_acc.plot(picks=["ACC_X","ACC_Y","ACC_Z","EMG"])

pb_mne