ReplaceAxisValues¶
Replace the values in an array of an axis (i.e
., channel names in a space axis) using search and replace with either a literal pattern (string or number) or a regular expression pattern. For example, to rename channels in the space axis with the format EEG Xx-LE to Xx, use (EEG )(.*[^-LE])(.*) as the pattern and (\2) as the substitution, with "regex" as the pattern_type. (For a regular expression cheatsheet and to easily test regular expressions, see https://pythex.org.).
Version 1.2.1
Ports/Properties¶
data¶
Data to process
axis¶
Axis to modify.
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).
array¶
The name of the axis array containing the elements to search and replace. For example, on the Space or Feature axis this is typically the names array, which holds the channel names on the Space axis and feature names in a Feature axis.
array_key¶
array_key has been renamed to array
pattern¶
A literal pattern or regular expression to search for in the axis array elements. Example (regex): (EEG )(.*[^-LE])(.*). If the pattern_type is set to numbers, the pattern should be a number. If wishing to replace numbers in string values, choose literal or regex as the pattern_type.
search_expr¶
search_expr has been renamed to pattern
substitution¶
A literal pattern or regular expression of the element to replace with. When using regex, to specify groups, use \n where n is the group number. Example: \2 with the above search expression would replace each element with the second matched group.
replace_expr¶
replace_expr has been renamed to substitution
pattern_type¶
Type of pattern search for. Literal means that each literal occurrence of the pattern will be substituted by the substitution string. Regex means that the pattern is interpreted as a regular expression. If the array contains numbers instead of strings, use numbers as the pattern type.
streams¶
A list of stream names, for the streams containing axis array elements to replace. Leave empty to replace values in all streams. Note: This parameter is deprecated. To operate on only a subset of streams, please use the ExtractStreams node first.
verbose¶
Output a log entry with the results of the change.
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.