Sort¶
Sort the data along an axis, either by the data values themselves (default), or by an index field of the chosen axis (e.g
., channel names). When sorting by values and if the data are multi-dimensional, the axis in question will be reset to a generic axis since the sort order will differ for every vector of data along that axis. Otherwise, the axis will be reordered to match the sort order. Note that it is not possible to sort by an axis field if that field is a multi-dimensional array (such as the .positions field of the space axis), since there is no universal way to sort by such a field. Besides the sorted data, this node will also emit a second output port containing the sort order (indices) of the data, which is of the same type as the input data. If the input was a packet, this will be a packet with a chunk for every chunk that had sortable data in it. To sort the data in descending order, use the Reverse node after this one. Version 1.0.1
Ports/Properties¶
data¶
Data to process.
- verbose name: Data
- default value: None
- port type: DataPort
- value type: AnyNumeric (can be None)
- data direction: INOUT
order¶
Sorting order (indices) of the data.
- verbose name: Order
- default value: None
- port type: DataPort
- value type: AnyNumeric (can be None)
- data direction: OUT
axis¶
Axis along which the data will be sorted. You can also specify an axis by its label, as in feature.mylabel.
- verbose name: Axis
- default value: axis
- port type: ComboPort
- value type: str (can be None)
sort_by¶
Sort key to use. If set to value, the entries will be sorted from smallest to largest. If set to axis-index, then the primary index array of the axis, e.g., .times for the time axis, .frequencies for the frequency axis, will be used to sort the data. If set to any other string, it is assumed that the axis contains an array with that name and that will be used to sort the data along that axis.
- verbose name: Sort By
- default value: value
- port type: ComboPort
- value type: str (can be None)
stream¶
Name of stream to process. Wildcards are supported, so mystream* will process all streams whose name starts with mystream.
- verbose name: Stream
- default value: None
- port type: StringPort
- value type: str (can be None)
stream_name¶
- verbose name: Stream Name
- default value: None
- port type: AliasPort
- 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)