Skip to content

← utilities package

ParseTriggerChannel

Extract event markers from a trigger channel.

The traditional way to mark events in sensor time series is using trigger channels that can take on a number of discrete numeric values (where 0 means "no event"). However, NeuroPype treats event markers as a separate data stream, where each event has a string to identify it and a timestamp of when it happened. This node lets you convert from a trigger channel to the NeuroPype format (markers will be the string versions of the numeric values in the channel). This node does not currently remove the trigger channel itself, so you need to remove it by hand if you are doing machine learning of any kind on the data. Version 1.0.0

Ports/Properties

data

Data to process.

  • verbose name: Data
  • default value: None
  • port type: DataPort
  • value type: Packet (can be None)
  • data direction: INOUT

channel

Index of the trigger channel, counting from 0. Negative values count from the end, e.g., -1 is the last channel. If this is None, the data is passed through unmodified.

  • verbose name: Trigger Channel Index
  • default value: None
  • port type: IntPort
  • value type: int (can be None)

debounce_ttl

Only mark onset times. If a trigger value is held for multiple successive samples, a marker will only be emitted for the first sample. This is typically what you want, since the hold time on the trigger channel usually has to be multiple samples long to ensure that spike is not missed. Disabling this allows you to generate a marker for every non-zero sample.

  • verbose name: Only Mark Onset Times
  • default value: True
  • port type: BoolPort
  • value type: bool (can be None)

Print extracted markers. This is for diagnostic and debugging purposes.

  • verbose name: Print Markers
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

previous_markers

Handling mode for previous marker streams. In replace mode, any previous NeuroPype marker stream (e.g., from LSL) will be removed and replaced by the trigger-based marker stream. In ignore mode, a new marker stream will be added and the old one will be kept. Note that if you do this, some subsequent processing nodes that handle marker streams may be confused and will only pick up one of the streams.

  • verbose name: Existing Marker Stream Handling
  • default value: replace
  • port type: EnumPort
  • value type: str (can be None)

set_breakpoint

Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

  • verbose name: Set Breakpoint (Debug Only)
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

metadata

User-definable meta-data associated with the node. Usually reserved for technical purposes.

  • verbose name: Metadata
  • default value: {}
  • port type: DictPort
  • value type: dict (can be None)