Skip to content

← markers package

RewriteMarkers

Rewrite, and optionally select, event markers according to one or more mapping rules.

This node allows one to rewrite one or more event markers to new markers. The node also optionally allows to use pattern-matching syntax, including wildcard syntax and regular expression syntax, which allows to match a large set of markers and then to remap those to a simpler, canonical marker name. An empty dictionary {} in the rewriting rules field will skip this node. You can also choose to drop all markers not matching the rewrite rules, effectively selecting only matching markers. Version 0.9.3

Ports/Properties

data

Data to process.

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

rules

Event marker rewriting rules. This is given as one or more mappings of some input marker string(s) or pattern(s) to some specific output marker string. This is given as in {some_input_markers1: 'mynewmarker1', some_input_marker2: 'mynewmarker2'}, where some_input_markers can be either a plain string, if just one marker shall be rewritten to a given new output marker, or a string pattern with * and/or ? wildcard characters (wildcard pattern syntax), or a regular expression (regex pattern syntax). It is also possible to use a list of input markers in round braces, as in {('myoldmarkerA', 'myoldmarkerB'): 'mynewmarker', ...}, or a list of string patterns. Pro Tip: if the input and output are identical no rewriting will take place. Use this combined with the 'remove all others' option to drop all markers except those matching the rewrite rule, without doing any actual rewriting. (Use regex as the pattern syntax to retain all markers that match a particular regex pattern.)

verbose name
Rewriting Rule
default value
{}
port type
Port
value type
object (can be None)

pattern_syntax

Optionally the syntax to use for the input marker patterns. If set to none, the input strings are not used as patterns but used to match a specific marker string verbatim. If set to wildcards, then the special character * can be used to match any number of characters (or none), while the character ? can be used to match any single character.

verbose name
Pattern Syntax
default value
wildcards
port type
EnumPort
value type
str (can be None)

regex_sub

Check this box if you want to use regex substitution with groups. Remember to escape any groups like this: \2 instead of `````.

verbose name
Regex Sub
default value
False
port type
BoolPort
value type
bool (can be None)

remove_all_others

Remove all other markers. If enabled, all markers other than those matched by the rules will be removed from the data.

verbose name
Remove All Others
default value
False
port type
BoolPort
value type
bool (can be None)

iv_column

If the marker stream instance axis data is a recarray then here we choose which field of the recarray to use for mapping. If the marker stream instance axis data is an array of strings then this field does nothing.

verbose name
Iv Column
default value
Marker
port type
StringPort
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)