ezmsg.xdf.source#

Classes

class PlaybackClock(rate=1.0, step_dur=0.005)[source]#

Bases: object

Parameters:
__init__(rate=1.0, step_dur=0.005)[source]#

Create an object that provides a timer that can run at a specified rate, and with a specified step duration.

Parameters:
  • rate (float) – Speed of playback. 1.0 is real time.

  • step_dur (float) – The duration of each step in seconds. Provide the duration using the unmodified rate.

reset()[source]#
Return type:

None

async astep()[source]#
Return type:

None

step()[source]#
Return type:

None

class XDFIteratorSettings(filepath: PathLike | str, select: str, chunk_dur: float = 1.0, start_time: float | None = None, stop_time: float | None = None, rezero: bool = True, playback_rate: float | None = None, self_terminating: bool = False)[source]#

Bases: Settings

Parameters:
filepath: PathLike | str#
select: str#
chunk_dur: float = 1.0#
start_time: float | None = None#
stop_time: float | None = None#
rezero: bool = True#
playback_rate: float | None = None#
self_terminating: bool = False#

If True, the unit will raise a ez.NormalTermination exception when the file is exhausted. Note, however, that this will terminate the pipeline even if the data published by this unit are still in transit, which will lead to the pipeline output being truncated before it has finished processing the stream. self_terminating should only be used when it is not important that the pipeline finish processing data, such as during prototyping and testing.

__init__(filepath, select, chunk_dur=1.0, start_time=None, stop_time=None, rezero=True, playback_rate=None, self_terminating=False)#
Parameters:
Return type:

None

class XDFIteratorUnit(*args, settings=None, **kwargs)[source]#

Bases: Unit

Parameters:

settings (Settings | None)

STATE#

alias of GenState

SETTINGS#

alias of XDFIteratorSettings

OUTPUT_SIGNAL = OutputStream:unlocated[<class 'ezmsg.util.messages.axisarray.AxisArray'>](self.num_buffers=32, self.force_tcp=False)#
OUTPUT_TERM = OutputStream:unlocated[typing.Any](self.num_buffers=32, self.force_tcp=False)#
initialize()[source]#

Runs when the Unit is instantiated. This is called from within the same process this unit will live. This lifecycle hook can be overridden. It can be run as async functions by simply adding the async keyword when overriding.

Return type:

None

construct_generator()[source]#
async pub_chunk()[source]#
Return type:

AsyncGenerator

class XDFMultiIteratorUnit(*args, settings=None, **kwargs)[source]#

Bases: Unit

Parameters:

settings (Settings | None)

STATE#

alias of GenState

SETTINGS#

alias of XDFMultiIteratorUnitSettings

OUTPUT_SIGNAL = OutputStream:unlocated[<class 'ezmsg.util.messages.axisarray.AxisArray'>](self.num_buffers=32, self.force_tcp=False)#
OUTPUT_TERM = OutputStream:unlocated[typing.Any](self.num_buffers=32, self.force_tcp=False)#
initialize()[source]#

Runs when the Unit is instantiated. This is called from within the same process this unit will live. This lifecycle hook can be overridden. It can be run as async functions by simply adding the async keyword when overriding.

Return type:

None

construct_generator()[source]#
async pub_multi()[source]#
Return type:

AsyncGenerator

class XDFMultiIteratorUnitSettings(filepath: Union[os.PathLike, str], select: set[str] | None = None, chunk_dur: float = 1.0, start_time: float | None = None, stop_time: float | None = None, rezero: bool = True, playback_rate: float | None = None, self_terminating: bool = False, force_single_sample: set = <factory>)[source]#

Bases: XDFIteratorSettings

Parameters:
select: set[str] | None = None#
force_single_sample: set#
__init__(filepath, select=None, chunk_dur=1.0, start_time=None, stop_time=None, rezero=True, playback_rate=None, self_terminating=False, force_single_sample=<factory>)#
Parameters:
Return type:

None

filepath: PathLike | str#
class PlaybackClock(rate=1.0, step_dur=0.005)[source]#

Bases: object

Parameters:
__init__(rate=1.0, step_dur=0.005)[source]#

Create an object that provides a timer that can run at a specified rate, and with a specified step duration.

Parameters:
  • rate (float) – Speed of playback. 1.0 is real time.

  • step_dur (float) – The duration of each step in seconds. Provide the duration using the unmodified rate.

reset()[source]#
Return type:

None

async astep()[source]#
Return type:

None

step()[source]#
Return type:

None

class XDFIteratorSettings(filepath: PathLike | str, select: str, chunk_dur: float = 1.0, start_time: float | None = None, stop_time: float | None = None, rezero: bool = True, playback_rate: float | None = None, self_terminating: bool = False)[source]#

Bases: Settings

Parameters:
filepath: PathLike | str#
select: str#
chunk_dur: float = 1.0#
start_time: float | None = None#
stop_time: float | None = None#
rezero: bool = True#
playback_rate: float | None = None#
self_terminating: bool = False#

If True, the unit will raise a ez.NormalTermination exception when the file is exhausted. Note, however, that this will terminate the pipeline even if the data published by this unit are still in transit, which will lead to the pipeline output being truncated before it has finished processing the stream. self_terminating should only be used when it is not important that the pipeline finish processing data, such as during prototyping and testing.

__init__(filepath, select, chunk_dur=1.0, start_time=None, stop_time=None, rezero=True, playback_rate=None, self_terminating=False)#
Parameters:
Return type:

None

class XDFIteratorUnit(*args, settings=None, **kwargs)[source]#

Bases: Unit

Parameters:

settings (Settings | None)

STATE#

alias of GenState

SETTINGS#

alias of XDFIteratorSettings

OUTPUT_SIGNAL = OutputStream:unlocated[<class 'ezmsg.util.messages.axisarray.AxisArray'>](self.num_buffers=32, self.force_tcp=False)#
OUTPUT_TERM = OutputStream:unlocated[typing.Any](self.num_buffers=32, self.force_tcp=False)#
initialize()[source]#

Runs when the Unit is instantiated. This is called from within the same process this unit will live. This lifecycle hook can be overridden. It can be run as async functions by simply adding the async keyword when overriding.

Return type:

None

construct_generator()[source]#
async pub_chunk()[source]#
Return type:

AsyncGenerator

class XDFMultiIteratorUnitSettings(filepath: Union[os.PathLike, str], select: set[str] | None = None, chunk_dur: float = 1.0, start_time: float | None = None, stop_time: float | None = None, rezero: bool = True, playback_rate: float | None = None, self_terminating: bool = False, force_single_sample: set = <factory>)[source]#

Bases: XDFIteratorSettings

Parameters:
select: set[str] | None = None#
force_single_sample: set#
__init__(filepath, select=None, chunk_dur=1.0, start_time=None, stop_time=None, rezero=True, playback_rate=None, self_terminating=False, force_single_sample=<factory>)#
Parameters:
Return type:

None

class XDFMultiIteratorUnit(*args, settings=None, **kwargs)[source]#

Bases: Unit

Parameters:

settings (Settings | None)

STATE#

alias of GenState

SETTINGS#

alias of XDFMultiIteratorUnitSettings

OUTPUT_SIGNAL = OutputStream:unlocated[<class 'ezmsg.util.messages.axisarray.AxisArray'>](self.num_buffers=32, self.force_tcp=False)#
OUTPUT_TERM = OutputStream:unlocated[typing.Any](self.num_buffers=32, self.force_tcp=False)#
initialize()[source]#

Runs when the Unit is instantiated. This is called from within the same process this unit will live. This lifecycle hook can be overridden. It can be run as async functions by simply adding the async keyword when overriding.

Return type:

None

construct_generator()[source]#
async pub_multi()[source]#
Return type:

AsyncGenerator