mahos.inst.digitizer.Spectrum_AnalogIn#
- class mahos.inst.digitizer.Spectrum_AnalogIn(name, conf=None, prefix=None)#
Spectrum Instrumentation digitizer (AnalogIn card).
In
triggeredmode, each hardware trigger records a fixed-length segment with multiple-recording FIFO mode.finite=Truestops after a positive logicalsamplescount divisible bycb_samples. Instreammode, data are streamed continuously with single FIFO mode. Triggered logical segments contain post-trigger samples only. The physical segment is enlarged as needed for mandatory pre-trigger samples and byte alignment, and the pre-trigger region is removed before data reduction and publication. Software triggering is rejected intriggeredmode;streammode uses a one-time software trigger internally.- Parameters:
lines (list[int | str]) – channel indices to enable, for example
[0]or[0, 1].channel_mask (int) – explicit channel bit mask. Takes precedence over
lines.resource (str) – card resource such as
/dev/spcm0orTCPIP::192.168.1.10::inst0::INSTR.serial_number (int) – card serial number.
queue_size (int) – (default: 10000) software buffer size.
silent (bool) – (default: False) suppress queue overflow warnings.
unit (str) – (default: V) reported data unit.
gain (float) – (default: 1.0) conversion gain in V per output unit.
timeout_sec (float) – (default: 5.0) card timeout in seconds.
notify_alignment_bytes (int) – (default: 4096) required byte alignment for FIFO notify sizes. Set to
1to disable alignment.segment_alignment_bytes (int) – (default:
notify_alignment_bytes) required byte alignment for physical segments in triggered mode. Set to1to disable alignment.trigger_sample_granularity (int) – (default: 16) sample-count granularity required for triggered logical segments and pre-trigger regions.
min_segment_samples (int) – (default: 32) minimum physical segment length in samples.
min_pre_trigger_samples (int) – (default: 16) minimum pre-trigger region in samples.
min_post_trigger_samples (int) – (default: 16) minimum logical post-trigger segment length in samples.
strict (bool) – (default: True) If True, check realized sampling rate strictly - the configuration fails whenever requested and realized rates don’t match.
- __init__(name, conf=None, prefix=None)#
Methods
__init__(name[, conf, prefix])close_resources()Close instrument resources.
configure(params[, label])Configure the instrument settings.
configure_stream(params)configure_triggered(params)get(key[, args, label])Get an instrument setting or measurement data.
get_fifo_status()pop_all_block()pop_all_opt()pop_block()pop_block_with_status()pop_opt()set(key[, value, label])Set an instrument setting or commanding value.
start([label])Start the instrument operation.
stop([label])Stop the instrument operation.