NaviNIBS.Navigator.Model.Samples module¶
- class NaviNIBS.Navigator.Model.Samples.Sample(key, timestamp, coilToMRITransf=None, targetKey=None, coilKey=None, isVisible=True, isSelected=False, color=None, metadata=NOTHING)[source]¶
Bases:
GenericCollectionDictItem
[str
]Represents a single recorded sample
- Parameters:
_key
_timestamp
_coilToMRITransf
_targetKey – Key of target that was active at the time sample was collected. Note that if target info (e.g. coordinates) changed later, this should automatically be updated to refer to a “historical” target with info matching that of the target at the time the sample was created.
_coilKey – Key of coil tool that was active at the time sample was collected.
_isVisible
_isSelected
_color
_metadata – For storing misc metadata, such as information about the trigger event that initiated this sample. Values should be JSON-serializable.
-
_timestamp:
Timestamp
¶
-
_coilToMRITransf:
ndarray]
¶
-
_targetKey:
Optional[str]
¶ Key of target that was active at the time sample was collected. Note that if target info (e.g. coordinates) changed later, this should automatically be updated to refer to a “historical” target with info matching that of the target at the time the sample was created.
-
_coilKey:
Optional[str]
¶ Key of coil tool that was active at the time sample was collected.
-
_isVisible:
bool
¶
-
_isSelected:
bool
¶
-
_color:
Optional[str]
¶
-
_metadata:
Any]
¶ For storing misc metadata, such as information about the trigger event that initiated this sample.
Values should be JSON-serializable.
- property timestamp¶
- property coilToMRITransf¶
- property hasTransf¶
- property targetKey¶
- property coilKey¶
- property isVisible¶
- property isSelected¶
- property color¶
- property metadata¶
- Note: if needing to modify the result, make sure to do within the changingMetadata context manager, like:
- with sample.changingMetadata() as metadata:
metadata[‘foo’] = ‘bar’
- class NaviNIBS.Navigator.Model.Samples.Samples(items=NOTHING)[source]¶
Bases:
GenericCollection
[str
,Sample
]- Parameters:
_items
- getUniqueSampleKey(baseStr='Sample ', startAtIndex=None, timestamp=None)[source]¶
Get a key not already used by any current samples, presumably to use for a new sample.
If a timestamp is specified, will format the key using the timestamp. Otherwise will be based on an index and length of samples.
- Return type:
str