mnefun.extract_expyfun_events¶
- mnefun.extract_expyfun_events(fname, return_offsets=False)¶
Extract expyfun-style serial-coded events from file
- Parameters:
- Returns:
- events
array
Array of events of shape (N, 3), re-coded such that 1 triggers are renamed according to their binary expyfun representation.
- presses
list
ofndarray
List of all press events that occurred between each one trigger. Each array has shape (N_presses,). If return_offset is True, then each array has shape (N_presses, 2), with the first column as the time offset from the trial trigger.
- orig_events
array
Original events array.
- events
Notes
When this function translates binary event codes into decimal integers, it adds 1 to the value of all events. This is done to prevent the occurrence of events with a value of 0 (which downstream processing would treat as non-events). If you need to convert the integer event codes back to binary, subtract 1 before doing so to yield the original binary values.