ezmsg.blackrock.nsp#
Classes
- class NSPSource(*args, settings=None, **kwargs)[source]#
Bases:
Unit- Parameters:
settings (Settings | None)
- SETTINGS#
alias of
NSPSourceSettings
- STATE#
alias of
NSPSourceState
- OUTPUT_SPIKE = OutputStream:unlocated[<class 'ezmsg.event.message.EventMessage'>](self.num_buffers=32, self.force_tcp=False)#
- OUTPUT_SIGNAL = OutputStream:unlocated[<class 'ezmsg.util.messages.axisarray.AxisArray'>](self.num_buffers=32, self.force_tcp=False)#
- async initialize()[source]#
Runs when the
Unitis instantiated. This is called from within the same process this unit will live. This lifecycle hook can be overridden. It can be run asasyncfunctions by simply adding theasynckeyword when overriding.- Return type:
None
- shutdown()[source]#
Runs when the
Unitterminates. This is called from within the same process this unit will live. This lifecycle hook can be overridden. It can be run asasyncfunctions by simply adding theasynckeyword when overriding.- Return type:
None
- class NSPSourceSettings(inst_addr: str = '', inst_port: int = 51001, client_addr: str = '', client_port: int = 51002, recv_bufsize: int | None = None, protocol: str = '3.11', cont_buffer_dur: float = 0.5, microvolts: bool = True, cbtime: bool = True)[source]#
Bases:
Settings- Parameters:
- cont_buffer_dur: float = 0.5#
Duration of continuous buffer to hold recv packets. Up to ~15 MB / second.
- cbtime: bool = True#
Use Cerebus time for continuous data (True) or local time.time (False). Note that time.time is delayed by the network transmission latency relative to Cerebus time.
- __init__(inst_addr='', inst_port=51001, client_addr='', client_port=51002, recv_bufsize=None, protocol='3.11', cont_buffer_dur=0.5, microvolts=True, cbtime=True)#
- class NSPSourceState[source]#
Bases:
State- device: NSPDevice#
- spike_queue: Queue[EventMessage]#
- cont_buffer = {1: (array([], dtype=int64), array([], shape=(1, 0), dtype=int16)), 2: (array([], dtype=int64), array([], shape=(1, 0), dtype=int16)), 3: (array([], dtype=int64), array([], shape=(1, 0), dtype=int16)), 4: (array([], dtype=int64), array([], shape=(1, 0), dtype=int16)), 5: (array([], dtype=int64), array([], shape=(1, 0), dtype=int16)), 6: (array([], dtype=int64), array([], shape=(1, 0), dtype=int16))}#
- cont_read_idx = {1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0}#
- cont_write_idx = {1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0}#
- template_cont = {1: AxisArray(data=array([], shape=(1, 0), dtype=float64), dims=['time', 'ch'], axes={}, attrs={}, key=''), 2: AxisArray(data=array([], shape=(1, 0), dtype=float64), dims=['time', 'ch'], axes={}, attrs={}, key=''), 3: AxisArray(data=array([], shape=(1, 0), dtype=float64), dims=['time', 'ch'], axes={}, attrs={}, key=''), 4: AxisArray(data=array([], shape=(1, 0), dtype=float64), dims=['time', 'ch'], axes={}, attrs={}, key=''), 5: AxisArray(data=array([], shape=(1, 0), dtype=float64), dims=['time', 'ch'], axes={}, attrs={}, key=''), 6: AxisArray(data=array([], shape=(1, 0), dtype=float64), dims=['time', 'ch'], axes={}, attrs={}, key='')}#
- scale_cont = {1: array([], dtype=float64), 2: array([], dtype=float64), 3: array([], dtype=float64), 4: array([], dtype=float64), 5: array([], dtype=float64), 6: array([], dtype=float64)}#
- class NSPSourceSettings(inst_addr: str = '', inst_port: int = 51001, client_addr: str = '', client_port: int = 51002, recv_bufsize: int | None = None, protocol: str = '3.11', cont_buffer_dur: float = 0.5, microvolts: bool = True, cbtime: bool = True)[source]#
Bases:
Settings- Parameters:
- cont_buffer_dur: float = 0.5#
Duration of continuous buffer to hold recv packets. Up to ~15 MB / second.
- cbtime: bool = True#
Use Cerebus time for continuous data (True) or local time.time (False). Note that time.time is delayed by the network transmission latency relative to Cerebus time.
- __init__(inst_addr='', inst_port=51001, client_addr='', client_port=51002, recv_bufsize=None, protocol='3.11', cont_buffer_dur=0.5, microvolts=True, cbtime=True)#
- class NSPSourceState[source]#
Bases:
State- device: NSPDevice#
- spike_queue: Queue[EventMessage]#
- cont_buffer = {1: (array([], dtype=int64), array([], shape=(1, 0), dtype=int16)), 2: (array([], dtype=int64), array([], shape=(1, 0), dtype=int16)), 3: (array([], dtype=int64), array([], shape=(1, 0), dtype=int16)), 4: (array([], dtype=int64), array([], shape=(1, 0), dtype=int16)), 5: (array([], dtype=int64), array([], shape=(1, 0), dtype=int16)), 6: (array([], dtype=int64), array([], shape=(1, 0), dtype=int16))}#
- cont_read_idx = {1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0}#
- cont_write_idx = {1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0}#
- template_cont = {1: AxisArray(data=array([], shape=(1, 0), dtype=float64), dims=['time', 'ch'], axes={}, attrs={}, key=''), 2: AxisArray(data=array([], shape=(1, 0), dtype=float64), dims=['time', 'ch'], axes={}, attrs={}, key=''), 3: AxisArray(data=array([], shape=(1, 0), dtype=float64), dims=['time', 'ch'], axes={}, attrs={}, key=''), 4: AxisArray(data=array([], shape=(1, 0), dtype=float64), dims=['time', 'ch'], axes={}, attrs={}, key=''), 5: AxisArray(data=array([], shape=(1, 0), dtype=float64), dims=['time', 'ch'], axes={}, attrs={}, key=''), 6: AxisArray(data=array([], shape=(1, 0), dtype=float64), dims=['time', 'ch'], axes={}, attrs={}, key='')}#
- scale_cont = {1: array([], dtype=float64), 2: array([], dtype=float64), 3: array([], dtype=float64), 4: array([], dtype=float64), 5: array([], dtype=float64), 6: array([], dtype=float64)}#
- class NSPSource(*args, settings=None, **kwargs)[source]#
Bases:
Unit- Parameters:
settings (Settings | None)
- SETTINGS#
alias of
NSPSourceSettings
- STATE#
alias of
NSPSourceState
- OUTPUT_SPIKE = OutputStream:unlocated[<class 'ezmsg.event.message.EventMessage'>](self.num_buffers=32, self.force_tcp=False)#
- OUTPUT_SIGNAL = OutputStream:unlocated[<class 'ezmsg.util.messages.axisarray.AxisArray'>](self.num_buffers=32, self.force_tcp=False)#
- async initialize()[source]#
Runs when the
Unitis instantiated. This is called from within the same process this unit will live. This lifecycle hook can be overridden. It can be run asasyncfunctions by simply adding theasynckeyword when overriding.- Return type:
None
- shutdown()[source]#
Runs when the
Unitterminates. This is called from within the same process this unit will live. This lifecycle hook can be overridden. It can be run asasyncfunctions by simply adding theasynckeyword when overriding.- Return type:
None