Skip to content

← tensor_math package

SeparateAxisElements

Separate the given axis elements into new axis elements.

For each item in the mapping, the data value(s) associated with the key will be repeated to the same size as the mapping value. This node can be used to expand an axis that was compressed with the Combine Axis Elements node. For example, if Combine Axis Elements was used to group ROIs and calculate a single value for a brain area, this node can then be used to recreate the individual ROIs within an area, with the data value from the area repeated for each ROI. Version 0.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

mapping

Grouping of old axis elements into new axis elements. The syntax is {old_ele_0: [new_ele_00, new_ele_01, ...], old_ele_1: [new_ele_10, new_ele_11, new_ele_11, ...], ...} where new_ele_X provide the items used to initialize the reconstructed axis, and each old_ele_X references a single item to be replaced in the old axis. Values for either can be provided as strings to be matched, integer indices, or floats. Example: {'mychan': [0,1,2], 'myotherchan': ['oldchanA','oldchanB','oldchanC']}. If mapping is None (default) then the target axis must have a 'original_elements' property.

verbose name
Element Grouping
default value
None
port type
Port
value type
object (can be None)

axis

The type of axis to operate on. The axis type may be appended by the axis label, separated by a . (dot), e.g., space.my_label .

verbose name
Axis
default value
space
port type
ComboPort
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)