SeparateChannelsByDistance¶
Calculate the distance between channels and either remove or place into a separate chunk channels which fall either below or above the threshold.
This is useful for either separating short channels into a separate chunk, or separating and/or dropping/removing channels which are considered too long to be included in the analysis. Version 1.2.2
Ports/Properties¶
data¶
Data to process.
stream¶
Stream(s) on which to perform this action. Leave empty to perform on all qualifying streams, that is, all streams which have a space axis and both .positions and .positions_source values. Wildcards are supported, i.e. mystream* will select the streams whose name starts with mystream.
threshold¶
Distance threshold, in mm. Channels which have a distance either above or below this threshold, depending on the value of the 'greater or less' parameter, will be separated and either placed into a separate chunk or removed.
reference_locs¶
Set of reference locations from which to calculate the distance. If not given, then the source-detector distance will be computed.
reference_geom¶
Type of geometry for which the distance to the reference locations shall be computed. This only applies if reference_locs is given. Position uses the regular ("detector") position, source uses the source position, line-segment is the straight line between source and detector position, midpoint the midpoint of that line. For backwards compatibility only, ray and its alias line use the (infinitely long) ray connecting the two. Optical-midpoint calculates the midpoint displaced towards the head center in accordance with the (rough) photon path, where the displacement is proportional to the channel length (scaled by optical_depth_scale). Banana represents a quadratic 'banana'-shaped photon path that passes through the optical modpoint.
unit¶
Unit in which the distance threshold is specified.
operator¶
Comparison to use between distance and threshold. For example if <, the action is applied to channels that are less than the threshold. The ~ operator means approx. equal.
action¶
Action to be taken on the selected channels. Move them into a new chunk (and remove from original chunk), or remove only (drop from the packet).
optical_depth_scale¶
Optical depth scale for NIRS geometries. Applies to optical-midpoint and the banana geometries. Given as the max channel depth as a factor of channel length. Note that the default of 0.5 is exaggerated, whereas the physically plausible scale is around 0.2 for 20-40mm channel lengths.
depth_displacement¶
Direction of depth displacement.
new_chunk¶
Optional name of the chunk into which the separated channels are placed if 'action' is set to 'move'. If unspecified, will be automatically derived from the old chunk name, operator, threshold, and unit (i.e., 'nirs<60mm'.
verbose¶
Print verbose output.
debug_plot¶
Enable debug/inspection plot. This will open a matplotlib window showing some inspection graphics. Currently only applies when reference_locs is given.
streams¶
Deprecated. Use stream instead.
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.