ezmsg.baseproc.util.message#

Functions

is_sample_message(message)[source]#

Check if the message is a SampleMessage.

Return type:

TypeGuard[SampleMessage]

Parameters:

message (Any)

Classes

class SampleMessage(trigger, sample)[source]#

Bases: object

Parameters:
__init__(trigger, sample)#
Parameters:
Return type:

None

trigger: SampleTriggerMessage#

The time, window, and value (if any) associated with the trigger.

sample: AxisArray#

The data sampled around the trigger.

class SampleTriggerMessage(timestamp=<factory>, period=None, value=None)[source]#

Bases: object

Parameters:
timestamp: float#

Time of the trigger, in seconds. The Clock depends on the input but defaults to time.time

period: tuple[float, float] | None = None#

The period around the timestamp, in seconds

value: Any = None#

A value or ‘label’ associated with the trigger.

__init__(timestamp=<factory>, period=None, value=None)#
Parameters:
Return type:

None

class SampleTriggerMessage(timestamp=<factory>, period=None, value=None)[source]#

Bases: object

Parameters:
timestamp: float#

Time of the trigger, in seconds. The Clock depends on the input but defaults to time.time

period: tuple[float, float] | None = None#

The period around the timestamp, in seconds

value: Any = None#

A value or ‘label’ associated with the trigger.

__init__(timestamp=<factory>, period=None, value=None)#
Parameters:
Return type:

None

class SampleMessage(trigger, sample)[source]#

Bases: object

Parameters:
__init__(trigger, sample)#
Parameters:
Return type:

None

trigger: SampleTriggerMessage#

The time, window, and value (if any) associated with the trigger.

sample: AxisArray#

The data sampled around the trigger.

is_sample_message(message)[source]#

Check if the message is a SampleMessage.

Return type:

TypeGuard[SampleMessage]

Parameters:

message (Any)