Skip to content

← utilities package

ConcatSuccessivePackets

Concatenate successive packets along some axis.

This node will buffer any packets it receives (to its data port), until it receives a None, at which time it will concatenate the buffered packets into a single packet and pass that on (it has no output prior to that). The packets must all have the same shape along all axes except the concatenation axis (though if this is not the case, you can choose to pad the incongruent axes with a zero or NaN value using the padding_value property). By default this will create a new axis of the desired type (e.g., space or time) and concatenate along that axis, but you can reuse an existing axis (i.e., if you don't need to retain the original axis or don't want two axes of the same type), by setting create_new to False. This node also has a no_buffering property which allows you to send it a list of packets to immediately concatenate and pass on (primarily for use in an offline pipeline). Version 1.1.2

Ports/Properties

data

Data to process.

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

dataN

A list of packets to concatenate (if no_buffering==True).

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

axis

Axis along which to concatenate data.

  • verbose name: Concatenate Along Axis
  • default value: time
  • port type: ComboPort
  • value type: str (can be None)

create_new

Whether to create a new axis. If enabled, a new axis of the desired type will be inserted and data will be concatenated along that axis.

  • verbose name: Append New Axis
  • default value: True
  • port type: BoolPort
  • value type: bool (can be None)

new_axis_label

Label for the new axis along which to concatenate. Only applies if append new axis is set.

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

properties

Values for the primary property of the new axis, if any. For instance, this would be a list of channel names if the axis is 'space'. If not given and a new axis is inserted, successive integers starting from 0 will be used as the values (so if this is e.g., a frequency axis, then the frequencies will be 0, 1, 2, and so on up to the number of packets that are concatenated.

  • verbose name: Values For New Axis
  • default value: None
  • port type: ListPort
  • value type: list (can be None)

padding_value

Value to use for padding, optional. If tensors to be concatenated differ in shape, concatenation is not possible unless each tensor is padded as necessary to make the dimensions compatible. If this is set to raise, tensors of different sizes will raise an error in this node. If set to invalid, the data will be filled with invalid data (NaN). If set to zero, the fill value will be zeroes.

  • verbose name: Padding Value
  • default value: raise
  • port type: EnumPort
  • value type: str (can be None)

nominal_gap

If axis is time, number of seconds to use as a gap between concatenated packets. This allows for algorithms such as filtering to be aware of a discontinuity in the time series.

  • verbose name: Nominal Gap
  • default value: 0.5
  • port type: FloatPort
  • value type: float (can be None)

handle_markers

If axis is 'time' and markers chunks are found with no 'time' axis but with 'instance' axis, then concatenate along the marker chunks' 'instance' axis.

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

no_buffering

If true, and a list of packets is passed to the dataN port, no buffering will occur and the packets received will be immediately concatenated and passed on. Any single packets received in the dataN port will be passed along without any concatenation (and a warning will be triggered). This feature is primarily useful when running an "offline" Neuropype pipeline.

  • verbose name: No Buffering
  • 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)