daq#

class mesofield.devices.daq.Nidaq[source]#

Bases: object

NIDAQ hardware control device.

This class implements the ControlDevice protocol via duck typing, providing all the necessary methods and attributes without inheritance.

initialize()[source]#

Initialize the device.

Return type:

None

arm(config)[source]#

No per-run prep needed.

Return type:

None

test_connection()[source]#

Pulse the configured DO line high for ~3 s as a connectivity test.

Logs the outcome; does not raise on failure (errors are surfaced via the logger).

reset()[source]#

Stop the worker thread (if running) and reset the NI-DAQ device.

start()[source]#

Begin counting edges on ctr and pulsing lines from a thread.

Configures both a counter-input task (rising-edge counts) and a digital-output task (camera trigger), then launches a worker thread that drives them on the configured poll_interval.

stop()[source]#

Signal the background thread to stop and wait for it.

This will also reset the NIDAQ device.

shutdown()[source]#

Close the device.

Return type:

None

get_data()[source]#

Retrieve a copy of the host-time exposure timestamps.

Return type:

list[float]

__init__(device_name, lines, ctr, io_type, device_id='nidaq', bids_type='', file_type='csv')#
Parameters:
Return type:

None