SetInstanceDetails¶
Set per-instance (e.g
., per-trial) metadata. This node adds or overrides instance.data fields in the given data's instance axis. Note that for this to happen, the data must already have an instance axis (e.g., be segmented). One of the most common uses of this node is in combination with the PathIterator node. PathIterator can parse metadata out of the path for each file (e.g., subject id, session, group, task, and so on), and it outputs this metadata through its curmeta port in the form of a Python dictionary. That output can then be wired into the details port of this node, which will then add the metadata to the instance axis of each trial extracted from the given dataset. This information can be used by statistics nodes (like GroupedMean), or to select a set of trials for processing or output (like SelectInstances).
Version 0.5.2
Ports/Properties¶
data¶
Data to process.
- verbose name: Data
- default value: None
- port type: DataPort
- value type: Packet (can be None)
- data direction: INOUT
details¶
Details to apply to instances, in a dictionary form, where the key is the instance field name and the value is the value to set. For example, {'subjectID': 'S1', 'groupID': 'control'}. See InstanceFields in constants.py for a list of common instance fields which can be referenced by their names (i.e., InstanceFields.SubjectID, InstanceFields.TargetValue, etc.). The name IF can be used to refer to InstanceFields (i.e., IF.SubjectID). The PathIterator node curmeta output of the PathIterator node.
- verbose name: Details
- default value: {}
- port type: DictPort
- value type: dict (can be None)
from_props¶
Transfer from stream/chunk properties. If set to True, then details is formatted as {'instance-field': 'property-field', ...} and specifies what property field to take each instance field from.
- verbose name: From Props
- default value: False
- port type: BoolPort
- value type: bool (can be None)
condition¶
Apply only to instances that meet this condition. This is a Python expression interpreted in the context of instance fields, e.g., Marker=='stimulus'. See documentation of NeuroPype's Query Grammar for differences compared to full Python syntax.
- verbose name: Condition
- default value:
- port type: StringPort
- value type: str (can be None)
assume_categorical¶
Assume that all fields provided in details are categorical variables.
- verbose name: Assume Categorical
- default value: True
- port type: BoolPort
- value type: bool (can be None)
auto_capitalize¶
Automatically capitalize the instance-axis fields if they are not already capitalized. The on (warn) setting will capitalize the fields and issue a one-time warning if any fields were capitalized.
- verbose name: Auto Capitalize
- default value: on (warn)
- port type: EnumPort
- 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)