NaviNIBS.Navigator.Model.Samples module

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.

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.

Key of coil tool that was active at the time sample was collected.

For storing misc metadata, such as information about the trigger event that initiated this sample.

Values should be JSON-serializable.

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’

Return type:

Dict[str, Any]

Bases: GenericCollection[str, Sample]

Parameters:

_items

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

Return type:

Samples

Return type:

Timestamp