Skip to content

← utilities package

SetAxisLabel

Set a custom label on a given axis.

The existing custom label will be replaced, if it exists. In NeuroPype, each axis has a type (for example, space, time, frequency). Additionally, any axis can be given a "label". Axis labels are most useful to distinguish between multiple axes of same type in a data packet, for example estimates of some non-symmetric quantity between all pairs of channels (e.g., information flow). Such data may have two space axes, and without a label it would not be possible to tell which of them is which (e.g., "from" and "to" channels). Neuropype does not assume or enforce a certain fixed order for axes, and some nodes may reorder axes in non-obvious ways. For this reason, axes are uniquely identifiable by their type, and if needed by their label. Note that this node will set or override the label of the first axis of the desired type in the data unless the 'axis_occurrence' property is set. Version 1.1.1

Ports/Properties

data

Data to process.

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

new_label

New axis label (custom_label) to set.

  • verbose name: New Label
  • default value: mylabel
  • port type: StringPort
  • value type: str (can be None)

axis_type

The axis to modify. You can additionally specify an axis label, using the format "space.mylabel", to select a specific axis.

  • verbose name: Axis Type
  • default value: space
  • port type: ComboPort
  • value type: str (can be None)

axis_occurrence

Index of the occurrence of the axis of desired type. (0 is the first axis of the desired type, 1 is the second, -1 is the last, -2 is the second-to-last, and so on). If not set, the first axis of the desired type will be used.

  • verbose name: Axis Occurrence
  • default value: 0
  • port type: IntPort
  • value type: int (can be None)

only_signals

If set to true, non-signal streams (i.e ., marker streams) will be ignored.

  • verbose name: Only Signals
  • default value: True
  • 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)