obob_mne.mixins.raw.AutomaticBinaryEvents¶
-
class
obob_mne.mixins.raw.
AutomaticBinaryEvents
(*args, **kwargs)[source]¶ Mixin for binary events.
If your triggers code events with binary triggers, this mixin can help you a lot.
Let’s suppose, you have an experiment with two types of blocks. At the beginning of each block, the type of the block is signalled by a a trigger code:
- Attend Auditory: Trigger 1
- Attend Visual: Trigger 2
Then you present either:
- A tone: Trigger 4
- An image: Trigger 8
And sometimes, one of them is an oddball which is marked by adding 1 to the trigger codes.
In this case, you can use this mixin and write something like this:
class Raw(mne.io.fiff.Raw, LoadFromSinuhe, AutomaticBinaryEvents): study_acronym = 'test_study' condition_triggers = { 'attention': { 'auditory': 1, 'visual': 2 } } stimulus_triggers = { 'modality': { 'audio': 4, 'visual': 8 }, 'oddball': 1 }
This will automatically result in mne-python aware event_ids like:
'attention:visual/modality:audio/oddball:True'