Direct constructor; caller must know the serial port
coreDAQ.discover(baudrate=115200, timeout=0.15)
list[str]
Return port paths of all connected coreDAQ devices
close()
None
Close the serial port and release the device
close() must be called when you are done. Alternatively, use coreDAQ as a context manager (with coreDAQ.connect(...) as coredaq) and the port is closed automatically on exit.
Raises coreDAQUnsupportedError when called on a LOG frontend.
Signature
Returns
get_range(channel)
int \| None
get_ranges()
list[int \| None]
set_range(channel, range_index)
None
set_ranges(range_indices)
list[int \| None]
set_range_power(channel, power_w)
int
set_range_powers(power_w_values)
list[int \| None]
supported_ranges()
list[dict]
set_autorange(enabled)
None
autorange()
bool
Calling any set_range* method automatically disables global autoRange so the chosen range is not overwritten on the next read. Call set_autorange(True) to re-enable it. See Ranges and AutoRange for full details.
Returns a dict. The result is cached after the first call; pass refresh=True to re-query.
Raises coreDAQCalibrationError if the firmware does not implement CALINFO? or returns a non-OK response. Older firmware that does not support the command will not affect any other API behaviour.
Key
Type
Source field
Meaning
valid
bool
VALID
True when calibration data passed CRC check
status
str
STATUS
Firmware status token e.g. "CAL_OK"
variant
str
VARIANT
Detector/topology identifier e.g. "INGAAS_LOG"
schema
str
SCHEMA
Calibration storage schema e.g. "LOG_LUT"
serial
str
SN
Instrument serial number
calibration_wavelength_nm
float
WL_NM
Reference wavelength used at calibration time
slot_address
int
ADDR
Flash slot base address (hex-parsed)
payload_size
int
SIZE
Calibration payload size in bytes
crc32
int
CRC
CRC-32 of the stored payload (hex-parsed)
raw
str
—
Original payload string from the firmware
info=coredaq.calibration_info(refresh=True)print(info["serial"])print(info["status"])# "CAL_OK"print(hex(info["crc32"]))# e.g. "0x1234abcd"print(info["valid"])# True
All exceptions inherit from coreDAQError. Catch coreDAQError to handle any driver error.
coreDAQError(Exception)
coreDAQConnectionError — serial port not found, device not responding, IDN? failed
coreDAQTimeoutError — triggered capture timed out waiting for trigger edge
coreDAQCalibrationError — calibration data missing or malformed
coreDAQUnsupportedError — feature not available on this variant (e.g. zero_dark on LOG)