Skip to content

Merge event codes and latencies

André Mouraux edited this page Apr 8, 2015 · 1 revision

In many experimental setups, it is useful to assign specific event codes to different types of events, for example, to distinguish between different experimental conditions. However, the method used to generate these different codes (e.g. a byte sent through the parallel port or the serial port to the EEG system) often have poor temporal precision. Therefore, it is sometimes also useful to record an additional uncoded trigger marking the actual onset of the event (e.g. a trigger obtained from an output connector of a sensory stimulator).

This function allows merging the latencies of a given series of events with the codes of another series of events.

merge_events

  • Reference event code (event1). The code of the events that must be used to store latency.
  • Conditional event code (event2). The code of the events that must be used to assign the event code label.
  • Minimum latency difference (event2-event1). The minimum value of the difference in latency between the conditional event code and the reference event code (e.g. -0.1 s means that the events will be merged if and only if the conditional event does not precede the reference event by more than 0.1 s).
  • Maximum latency difference (event2-event1). The maximum value of the difference in latency between the conditional event code and the reference event code (e.g. +0.1 s means that the events will be merged if and only if the conditional event does not follow the reference event by more than 0.1 s).

In this example, events with event codes corresponding to ‘L 1’ will be changed to event codes ‘L 2’ if and only if the latency of ‘L 1’ events equals the latency of an ‘L 2’ event ± 0.1 s.

Clone this wiki locally