Skip to content

← formatting package

SeparateStreams

Separate streams that match a criterion from other streams.

An incoming data packet may carry multiple data streams, and for each stream a packet will have one chunk. This node will check the properties (props) of each chunk whether they meet the specified condition, and if so, the chunk will appear in the 'matching' output, otherwise in the 'other' output. To negate a condition, one may simply use the output of the 'other' output instead of the 'matching' output, but one can also prefix the condition with a 'not' keyword, as in: 'not is_signal'. The condition is generally an expression that is evaluated in the context of the properties (props) of the stream, where missing properties are assumed to be None. So for example, the following are also valid: "is_signal and unit=='uV'"; "int(subject_id) <= 100". The node Merge Streams can be used to recombine previously separated streams again into a single packet (but not that the order of the streams may not be preserved). Version 0.5.0

Ports/Properties

data

Data to process.

verbose name
Data
default value
None
port type
DataPort
value type
AnyNumeric (can be None)
data direction
IN

matching

Data with only matching streams.

verbose name
Matching
default value
None
port type
DataPort
value type
AnyNumeric (can be None)
data direction
OUT

other

Remaining data that did not match the criterion.

verbose name
Other
default value
None
port type
DataPort
value type
AnyNumeric (can be None)
data direction
OUT

condition

The condition that matching streams need to satisfy. This is generally an expression that is evaluated on the properties (props) of the stream. See documentation on NeuroPype's sandboxed Python expression grammar for more information.

verbose name
Condition
default value
is_signal
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)