Skip to content

← machine_learning package

InjectCalibrationData

Insert calibration data into the stream.

This node is useful when you have a pipeline that receives some data from a data source (e.g., an LSL Input node) and performs some processing on the data (e.g., make predictions using some machine learning nodes) -- and this pipeline requires calibration on some previously recorded calibration data. This node can be inserted between the data source and the first adaptive processing step in your pipeline, and what it allows you to do is as follows: the node has a second input port, which you can wire to some node(s) that import your calibration data (e.g., Import XDF). Then, the Inject Calibration Data node will first let through the calibration recording, which will then trickle down your subsequent processing pipeline, giving every node a chance to calibrate itself. After that, the Inject Calibration Data node will let through the regular streaming data from your actual data source, so that the pipeline can do its regular processing, now that it is calibrated. Note that, since on the first tick this node outputs the calibration data, the question arises what happens to any streaming data that also came into the Inject Calibration Data node on that same first tick -- you can choose to either emit it on the next tick, and thus delay this and all subsequent streaming packets by one tick (1/25th of a second at NeuroPype's default update rate), or you can choose to drop it. Tip: if you want to collect the calibration data on the fly at the beginning of a real-time session instead of using a previous recording, you can instead use the Accumulate Calibration Data node. Version 1.0.0

Ports/Properties

streaming_data

Streaming data.

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

calib_data

Calibration data.

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

data

Output data.

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

delay_streaming_packets

Whether streaming packets should be delayed by one tick, or whether the first streaming packet should be dropped. If enabled, the first streaming packet will be buffered by this node, and emitted on the next tick (since on the first tick this node outputs the calibration data); all subsequent streaming packets will naturally also have to be delayed by one tick. If disabled, then the first streaming packet will be dropped, and there is no delay. For streaming processing, it is usually best to drop the packet, since incoming streaming data can generally not be acted on before the pipeline is finished calibrating. However, if the data on the streaming input port is actually a single packet holding a whole recording that shall be processed in an offline fashion, then it must be delayed by one tick, since dropping it would drop all the data.

  • verbose name: Delay Streaming Packets
  • default value: False
  • port type: BoolPort
  • value type: bool (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)