NaviNIBS.Navigator.Model.Triggering module¶
- class NaviNIBS.Navigator.Model.Triggering.TriggerEvent(type, time=Timestamp('2025-06-15 21:56:35.631711'), metadata={})[source]¶
Bases:
object
- Parameters:
type (
str
)time (
Timestamp
)metadata (
Dict
[str
,Any
])
- type: str¶
- time: Timestamp¶
- metadata: Dict[str, Any]¶
- class NaviNIBS.Navigator.Model.Triggering.TriggerSource(key, isEnabled=True)[source]¶
Bases:
GenericCollectionDictItem
[str
]- Parameters:
_key – Literal key that will trigger hotkey (e.g. “.” or “PgDn”)
_isEnabled
- type: ClassVar[str] = 'TriggerSource'¶
- _isEnabled: bool¶
- sigTriggered: Signal¶
- property isEnabled¶
- class NaviNIBS.Navigator.Model.Triggering.LSLTriggerSource(key, isEnabled=True, streamKey=None, fallbackTriggerSourceKey=None, triggerEvents=None, triggerValueIsEpochID=False, defaultAction='pulse', minInterTriggerPeriod=0.2)[source]¶
Bases:
TriggerSource
- Parameters:
_key – Literal key that will trigger hotkey (e.g. “.” or “PgDn”)
_isEnabled
_streamKey
_fallbackTriggerSourceKey – If the primary LSL stream is not available, can fallback to another trigger source. The fallback source will be disabled when the primary is available, and enabled when the primary is not available.
_triggerEvents
_triggerValueIsEpochID
_defaultAction
_minInterTriggerPeriod
- type: ClassVar[str] = 'LSLTriggerSource'¶
- _streamKey: tp.Optional[str]¶
- _fallbackTriggerSourceKey: str | None¶
If the primary LSL stream is not available, can fallback to another trigger source. The fallback source will be disabled when the primary is available, and enabled when the primary is not available.
- _triggerEvents: tp.Optional[dict[str, tp.Optional[str]]]¶
- _triggerValueIsEpochID: bool¶
- _defaultAction: str¶
- _minInterTriggerPeriod: float¶
- property streamKey¶
- property fallbackTriggerSourceKey¶
- property triggerEvents¶
- property triggerValueIsEpochID¶
- property defaultAction¶
- property minInterTriggerPeriod¶
- class NaviNIBS.Navigator.Model.Triggering.Hotkey(key, action, keyboardDeviceID=None)[source]¶
Bases:
GenericCollectionDictItem
[str
]- Parameters:
_key – Literal key that will trigger hotkey (e.g. “.” or “PgDn”)
_action – Action to trigger when hotkey fires (e.g. “sample”, “previous”, or “next”)
_keyboardDeviceID – Can specify a keyboard’s device ID to only respond to keypresses from that device. Useful for situations like when using a presenter remote that generates common keypresses like ‘.’ and ‘esc’, and you don’t want triggers to be generated when pressing the same keys on a normal keyboard. If None, no device filter will be applied.
- _key: str¶
Literal key that will trigger hotkey (e.g. “.” or “PgDn”)
- _action: str¶
Action to trigger when hotkey fires (e.g. “sample”, “previous”, or “next”)
- _keyboardDeviceID: str | None¶
Can specify a keyboard’s device ID to only respond to keypresses from that device. Useful for situations like when using a presenter remote that generates common keypresses like ‘.’ and ‘esc’, and you don’t want triggers to be generated when pressing the same keys on a normal keyboard.
If None, no device filter will be applied.
- property action¶
- property keyboardDeviceID¶
- class NaviNIBS.Navigator.Model.Triggering.Hotkeys(items=NOTHING)[source]¶
Bases:
GenericCollection
[str
,Hotkey
]- Parameters:
_items
- class NaviNIBS.Navigator.Model.Triggering.HotkeyTriggerSource(key, isEnabled=True, hotkeys=NOTHING)[source]¶
Bases:
TriggerSource
- Parameters:
_key – Literal key that will trigger hotkey (e.g. “.” or “PgDn”)
_isEnabled
_hotkeys
- type: ClassVar[str] = 'HotkeyTriggerSource'¶
- property hotkeys¶
- class NaviNIBS.Navigator.Model.Triggering.TriggerReceiver(key, minTimeBetweenEvents=None)[source]¶
Bases:
object
- Parameters:
_key – Literal key that will trigger hotkey (e.g. “.” or “PgDn”)
_minTimeBetweenEvents
- _key: str¶
Literal key that will trigger hotkey (e.g. “.” or “PgDn”)
- _minTimeBetweenEvents: float | None¶
- sigTriggered: Signal¶
- property key¶
- class NaviNIBS.Navigator.Model.Triggering.TriggerRouter[source]¶
Bases:
object
Handle routing of triggers to any of multiple trigger receivers, e.g. to handle cases where when the registration panel is in the foreground, triggers should record a new registration point, but if the navigation panel is in the foreground, triggers should record a new coil orientation sample.
Note: this is implemented here for centralization, but is not persisted in session file(s)
- class NaviNIBS.Navigator.Model.Triggering.TriggerSources(items=NOTHING)[source]¶
Bases:
GenericCollection
[str
,TriggerSource
]- Parameters:
_items
- property triggerRouter¶