Bipolar EEG and Epochs rejection

External Email - Use Caution

Goodmorning,

I am new to python and MNE.

I am trying to replicate a brain vision analyzer pre-processing in MNE. In this pre-processing authors rejected epochs in which horizontal EOG exceeded 30 mV and/or vertical EOG exceeded 60 mV. I'm trying to achieve this result using the command mne.Epochs. However, in the reject dictionary I don't know how to specify this "double condition".

Ideally I would to write somenthing like that:

reject = dict(eeg = 160e-6, ["VEOG"] = 120e-6, ["HEOG"] = 30e-6)

epochs = mne.Epochs(raw, events=events[0], event_id=[71, 72], tmin=-0.1, tmax=0.6, proj=True, baseline=(-0.1,0), reject=reject, preload=True)

However in reject dictionary, if I understood correctly, I can only use one key 'eog'.

Thank you very much for your help,
Any advice will be usefull,
Bests,
Pietro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200318/30f0be10/attachment.html

1 Like

I don't think there's a way to do this via the Epochs constructor. There
are two questions I have:

(1) Did BVA use? peak-to-peak and or absolute threshold? I'm guessing
absolute (see next question), but the Epochs constructor uses peak-to-peak.

(2) Did you mean mV (1e-3) or ?V (1e-6)? You use mV in your text, but
the scaling in your example is ?V.

If you want absolute thresholds and not peak-to-peak, checkout
philistine.abs_threshold. Assuming you want mV

https://philistine.readthedocs.io/en/latest/api/philistine.mne.abs_threshold.html

epochs = ....

hmask = abs_threshold(epochs.copy().pick("HEOG"), 30e-3, eog=True)

vmask = abs_threshold(epochs.copy().pick("VEOG"), 120e-3, eog=True)

eye_mask = np.logical_or(hmask, vmask)

epochs.drop(eye_mask, reason="EOG")

(note that I'm the author of philistine)

Best,

Phillip

???External Email - Use Caution???

Goodmorning,

I am new to python and MNE.

I am trying to replicate a brain vision analyzer pre-processing in
MNE. In this pre-processing authors rejected epochs in which
horizontal EOG exceeded 30 mV and/or vertical EOG exceeded 60 mV. I'm
trying to achieve this result using the command mne.Epochs. However,
in the reject dictionary I don't know how to specify this "double
condition".

Ideally I would to write somenthing like that:

reject = dict(eeg = 160e-6, ["VEOG"] = 120e-6, ["HEOG"] = 30e-6)

epochs = mne.Epochs(raw, events=events[0], event_id=[71, 72],
tmin=-0.1, tmax=0.6, proj=True, baseline=(-0.1,0), reject=reject,
preload=True)

However in reject dictionary, if I understood correctly, I can only
use one key 'eog'.

Thank you very much for your help,
Any advice will be usefull,
Bests,
Pietro

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200318/28a310ce/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200318/28a310ce/attachment.bin
-------------- next part --------------
        External Email - Use Caution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200318/28a310ce/attachment-0001.html

1 Like

External Email - Use Caution

I think this might be possible, if you change one of them (say, the HEOG) to type 'misc', then you could use separate reject criteria for EOG and MISC channel types. Only works if you don't have other MISC channels already, of course. Example: https://gist.github.com/drammock/475d6a0aef16468d2013f145d7dd0151

-- dan
Daniel McCloy
https://dan.mccloy.info
Research Scientist
Institute for Learning and Brain Sciences
University of Washington

??? Original Message ???

1 Like

External Email - Use Caution

(putting the list back in CC)

Yes, all that should work, but two comments:

1. Those are rather strict thresholds you're using. Depends on other
things in your data, but those are much stricter than the ones I'm used to.

2. You don't need to use copy for the eeg_mask; you need it in the
eog_mask because of the pick() step.

Best,

Phillip

External Email - Use Caution

Thank you for you reply!