Skip to content

← formatting package

CreateAxis

An axis indexes data along a dimension.

It can be time, space, frequency, instance, feature, statistic, named, lag, or axis (or user-defined axis classes). Each axis type has a set of built-in fields, e.g., time has array .times (in seconds) and prop .nominal_rate, while frequency has array .frequencies (in Hz). An axis can also be identified with a label. Axes are used to construct Block objects, which are comprised of a multi-dimensional array and a list of axes that characterize the array's dimensions. Regardless of whether you want to populate the default fields (e.g., names and times) or custom fields (e.g., myfield), you specify the name of the field in one of the numbered name inputs and wire in the associated payload array into the respective numbered array input. Version 1.0.0

Ports/Properties

axis

Output axis.

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

type

Type of axis to create.

  • time: an axis that represents time, has array .times and prop .nominal_rate
  • space: an axis that represents spatially distributed data (e.g., channels), has among others arraya .names (channel names) and .positions (3d positions), and props .naming_system and .coordinate_system
  • frequency: an axis that represents frequency, e.g., in a spectral decomposition, has array .frequencies
  • instance: an axis that represents instances, e.g., trials or segments, has arrays .times (occurrence time) and .data (nested array of per-instance data)
  • feature: an axis that indexes arbitrary features (e.g., after feature extraction), has array .names (feature names) and several others
  • statistic: an axis that indexes statistics, has array .param_types (statistical parameter types) and .labels (optionally a string label for each statistic)
  • named: an axis that indexes named items, has array .names (item names) (space and feature are specializations of a named axis)
  • lag: an axis that indexes lags (e.g., in delay-embedded data or filter kernels), has array .lags (integer lag values)
  • axis: a generic axis that has no built-in fields, only a length

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

name1

Array name 1.

  • verbose name: Array Name 1
  • default value: None
  • port type: StringPort
  • value type: str (can be None)

array1

Array 1.

  • verbose name: Array1
  • default value: None
  • port type: DataPort
  • value type: AnyArray (can be None)
  • data direction: IN

name2

Array name 2.

  • verbose name: Array Name 2
  • default value: None
  • port type: StringPort
  • value type: str (can be None)

array2

Array 2.

  • verbose name: Array2
  • default value: None
  • port type: DataPort
  • value type: AnyArray (can be None)
  • data direction: IN

name3

Array name 3.

  • verbose name: Array Name 3
  • default value: None
  • port type: StringPort
  • value type: str (can be None)

array3

Array 3.

  • verbose name: Array3
  • default value: None
  • port type: DataPort
  • value type: AnyArray (can be None)
  • data direction: IN

name4

Array name 4.

  • verbose name: Array Name 4
  • default value: None
  • port type: StringPort
  • value type: str (can be None)

array4

Array 4.

  • verbose name: Array4
  • default value: None
  • port type: DataPort
  • value type: AnyArray (can be None)
  • data direction: IN

name5

Array name 5.

  • verbose name: Array Name 5
  • default value: None
  • port type: StringPort
  • value type: str (can be None)

array5

Array 5.

  • verbose name: Array5
  • default value: None
  • port type: DataPort
  • value type: AnyArray (can be None)
  • data direction: IN

nameN

Additional array names.

  • verbose name: Additional Array Names
  • default value: []
  • port type: ListPort
  • value type: list (can be None)

arrayN

Additional arrays.

  • verbose name: Arrayn
  • default value: None
  • port type: DataPort
  • value type: list (can be None)
  • data direction: IN

props

Properties to set on the axis.

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

custom_label

Optional custom label for the axis. Labels make it easier to identify an axis in the event there are multiple axes of the same type in the packet. Nodes where an axis can be specified (e.g., space, time, etc) can also accept a string in the format space.mylabel that precisely identifies the axis to be the space axis that has label mylabel.

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

length

Optionally the length (number of elements) of the axis. Only necessary if no arrays are given.

  • verbose name: Length
  • default value: None
  • port type: IntPort
  • value type: int (can be None)

verbose

Print verbose diagnostic information.

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

name0

Array name 0.

  • verbose name: Array Name 0
  • default value: None
  • port type: StringPort
  • value type: str (can be None)

array0

Array 0.

  • verbose name: Array0
  • default value: None
  • port type: DataPort
  • value type: AnyArray (can be None)
  • data direction: IN

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)