Hi @saltwater, Could you provide more information on the kind of adjustment needed for the imported values? It may be possible that there are functions already in Brainstorm to do so.
In MNE-Python, the mne.find_events() function is used to extract events from a raw data file, typically from the stim channel. The mask parameter in this function allows you to filter the events based on their values.
Working
Extracting Events: The mne.find_events() function scans the stim channel of the raw data and identifies points where events occur. These events are usually represented as integer values in the stim channel, with each value corresponding to a specific event marker (e.g., onset of a stimulus, button press, etc.).
Applying the Mask: The mask parameter is a bitmask that specifies which bits in the event values should be considered when filtering events. It allows you to selectively include or exclude events based on certain criteria.
Filtering Events: When you provide a mask value, mne.find_events() uses it to filter the event values before returning them. Only the events that match the specified criteria defined by the mask are included in the output.
Example
Suppose your event values are 8-bit binary numbers.
You want to extract events of type A, which have the 3rd and 4th bits set to 1.
You also want to extract events of type B, which have the 6th and 7th bits set to 1.
You can define masks to filter events of type A and type B accordingly: