SetAxisValues¶
Set values for the fields of an axis.
For example, set channel names on a space axis, timestamps on a time axis, feature names on a feature axis, frequencies on a frequency axis. The number of new values must equal the current number of values in the axis (the length of the axis). This node does not shrink or expand the axis to match the number of values. If the axis is an instance axis, array will by default assumed to be a field in the instance.data array rather than its own array in the instance axis. For example, this can be used to set the Marker or TargetValue values for instances (trials), much like the SetInstanceDetails node. If instance_data_field is set to False, then array is assumed to be an array of the instance axis. (This behavior is unique to the instance axis, and the instance_data_field default will be set to False in a future release.)
Version 2.0.0
Ports/Properties¶
data¶
Data to process.
stream¶
Name of stream containing the axis to operate on. If empty, the operation will be performed on all streams which contain the specified axis. Note that this does not require an exact match. Any stream with a name beginning with the value specified here will be matched.
axis¶
The Axis to modify, by its type. You can more precisely specify the axis to modify, i.e., if the packet might contain multiple axes of the same type, by including the the axis' custom_label using the following format: axis.mylabel. Otherwise, the first axis of the given type will be modified.
array¶
The array (field) on the axis that will be set or updated. If unspecified, the default array for the specified axis will be used. This is times for a time axis, frequencies for a frequency axis, names for a space axis or feature axis.
array_name¶
values¶
New values for the axis array. If a constant, this will be repeated for every element presently in the axis. If a list (can be a list of lists) then it must be the same length as the axis. Note that the axis must continue to match the existing shape of the data tensor (the data tensor is not automatically expanded or contracted to match a new number of elements along an axis).
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). This is no longer recommended; instead specify the axis label (which can be set with SetAxisLabel if not already existing, in the axis property (i.e., time.my_label).
handle_existing¶
How to handle existing values in the axis array. You may either replace all existing values with the new values, or set a value only for those elements which are missing a value (have an empty string or a NaN), skip the axis altogether if the array contains any non-empty values (values other than an empty string or NaN), or raise an error if the array contains any values (other than an empty string or NaN).
infer_dummy_values¶
If set to true, and values is None or empty, the node will attempt to replace the selected target axis array with a set of empty dummy values.
only_signals¶
If set to true, non-signal streams (i.e ., marker streams) will be ignored.
instance_data_field¶
If True and updating an instance axis, the array_name will be assumed to be a field in the instance.d ata array rather than its own array in the instance axis. This is unique to the instance axis and included for backward compatibility purposes. This default will be changed to False in the future.
set_breakpoint¶
Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.
metadata¶
User-definable meta-data associated with the node. Usually reserved for technical purposes.