Configuration
Configuration Reference
Generated field reference for pmoke config schema version 5.
Generated from the typed config metadata registry. Manual edits are overwritten.
- pmoke
- 0.4.0
- config schema
- 5
- source
- 9107b7e40779
JSON Schema · pmoke config explain
| Path | Type | Required | Default / values | Description and constraints |
|---|
version | integer | required | 5 | Configuration schema version. New and migrated configurations use schema version 5. Constraints: must equal 5 |
| Path | Type | Required | Default / values | Description and constraints |
|---|
scope | table | required | - | Oscilloscope configuration. Selects one registered scope model and its transport URI. |
scope.model | string | required | DHO5108 | Oscilloscope driver model. The model must match an oscilloscope registered by the instruments crate. Constraints: must be a registered oscilloscope model |
scope.connection | connection URI | required | tcp://, visa:, gpib:// | Oscilloscope transport URI. DHO5108 normally uses direct TCP/IP and never uses a Prologix transport. Constraints: transport must be supported by the model and build features |
| Path | Type | Required | Default / values | Description and constraints |
|---|
generator | table | optional | absent | Optional function-generator configuration. Required only by commands that trigger or automate a measurement. Constraints: required by trigger, autoshot, automeasure, and auto |
generator.model | string | conditional | WF1946B | Function-generator driver model. Required when the generator table is present. Constraints: must be a registered generator model |
generator.connection | connection URI | conditional | gpib://, prologix-tcp://, prologix-serial:// | Function-generator transport URI. The URI selects native GPIB or a Prologix TCP/serial controller. Constraints: transport must be supported by the model and build features |
| Path | Type | Required | Default / values | Description and constraints |
|---|
data | table | required | - | Acquisition storage and analysis-input policy. Controls canonical waveform formats and optional screenshot capture. |
data.output | string enum | required | csv, raw, both | Waveform format written by acquisition. Raw is preferred for very large captures; both also writes CSV. |
data.input | string enum | required | csv, raw, auto | Waveform source used by analysis. Auto selects available canonical data, preferring verified raw data. |
data.screenshot | boolean | optional | false; true, false | Oscilloscope screenshot capture. Capture requires a scope and transport that support display transfer. Constraints: DHO5108 capture requires TCP/IP or USB-TMC |
| Path | Type | Required | Default / values | Description and constraints |
|---|
sensors | array of tables | conditional | [] | Sensor-channel metadata and scaling. Each entry assigns one channel and exactly one scaling strategy. Constraints: channels must not overlap reference or lock-in signal channels |
| Path | Type | Required | Default / values | Description and constraints |
|---|
sensors[].channel | integer | required | - | Oscilloscope sensor channel. The current DHO5108 mapping accepts channels 1 through 8. Constraints: 1 <= value <= 8; must be unique across all channel roles |
sensors[].scale | inline table union | required | { factor = ... }, { max_abs = ..., polarity = ... } | Sensor conversion rule. Choose direct multiplication or maximum-absolute normalization. Constraints: factor and max_abs forms are mutually exclusive |
sensors[].scale.factor | float | conditional | - | Linear sensor conversion factor. Multiplies the integrated sensor values directly. Constraints: must be finite and non-zero |
sensors[].scale.max_abs | float | conditional | - | Target maximum absolute sensor value. Normalizes the measured absolute maximum to this positive target. Constraints: must be finite and positive |
sensors[].scale.polarity | integer enum | conditional | -1, 1 | Polarity for maximum-absolute scaling. Required with max_abs scaling. Constraints: must equal -1 or 1 |
sensors[].label | string | required | - | Plot label for the sensor. Matplotlib mathtext may be supplied as a TOML literal string. Constraints: must not be empty |
sensors[].unit | string | required | - | Output unit for the scaled sensor. Used in tables, plots, and saved analysis headers. Constraints: must not be empty |
| Path | Type | Required | Default / values | Description and constraints |
|---|
pulse | table | required | - | Pulse background windows. Defines baseline regions before and after the pulse. Constraints: background windows must not overlap |
pulse.background_before | inline time window · s | required | - | Background window before the pulse. An inline table with finite start and end values. Constraints: start < end |
pulse.background_after | inline time window · s | required | - | Background window after the pulse. An inline table with finite start and end values. Constraints: start < end |
| Path | Type | Required | Default / values | Description and constraints |
|---|
reference | table | required | - | Recorded EOM-drive signal analysis settings. Controls the channel that records the function-generator sine wave sent to the EOM, the FFT region, and fit decimation. |
reference.channel | integer | required | - | Recorded EOM-drive signal channel. The current DHO5108 mapping accepts channels 1 through 8; assign the function-generator sine wave sent to the EOM. Constraints: 1 <= value <= 8; must be unique across all channel roles |
reference.fft_window | inline time window · s | required | - | Time range used by the EOM-drive FFT. Choose a stable segment of the recorded sine wave with finite start and end values. Constraints: start < end |
reference.stride_samples | integer · samples | required | - | EOM-drive sine-fit decimation stride. Larger values reduce fitting cost at the expense of temporal detail. Constraints: must be positive |
reference.window_samples | integer · samples | required | - | Local EOM-drive sine-fitting window size. Used around the FFT estimate by EOM-drive signal analysis. Constraints: must be positive |
| Path | Type | Required | Default / values | Description and constraints |
|---|
lockin | table | required | - | Numerical lock-in settings. Defines signal channels, parallelism, output stride, and low-pass filtering. |
lockin.signal_channels | integer array | conditional | - | Channels demodulated by lock-in analysis. At least one channel is required by lock-in and downstream analysis. Constraints: each value must be in 1..=8; must be unique across all channel roles |
lockin.workers | integer | required | - | Parallel lock-in worker count. Values near the physical CPU count are a practical starting point. Constraints: must be positive |
lockin.stride_samples | integer · samples | required | - | Lock-in output stride in input samples. Input sample rate divided by this value gives the output sample rate. Constraints: must be positive |
lockin.filter | tagged inline table | required | - | Lock-in low-pass filter configuration. The current runtime accepts the boxcar_legacy kind; fields from other kinds are not part of schema v5. Constraints: fields from other filter kinds are rejected |
lockin.filter.kind | string enum | required | boxcar_legacy | Lock-in filter algorithm. boxcar_legacy is the only active LPF. Historical FIR and IIR kinds are readable only for migration diagnostics. |
lockin.filter.half_window_cycles | float · reference cycles | required | - | Half-window scale in reference cycles. The boxcar integration window extends symmetrically by this many reference cycles. Constraints: must be finite and positive |
lockin.debug_output | boolean | optional | false; true, false | Lock-in debug artifact output. Enable only for filter inspection because artifacts can be large. |
lockin.debug_label | string | optional | absent | Safe suffix for debug artifacts. The label is restricted to a short ASCII filename-safe subset. Constraints: 1-64 ASCII alphanumeric, '.', '_', or '-'; must not be '.' or '..' |
lockin.debug_overwrite | boolean | optional | false; true, false | Debug artifact overwrite policy. Allows replacement of an existing matching debug output. |
lockin.snr_background_window | inline time window · s | optional | absent | Optional background window for SNR diagnostics. An inline table with finite start and end values. Constraints: start < end |
lockin.snr_signal_window | inline time window · s | optional | absent | Optional signal window for SNR diagnostics. An inline table with finite start and end values. Constraints: start < end |
lockin.save_npy | boolean | optional | false; true, false | NumPy output for lock-in results. Writes NPY artifacts in addition to canonical CSV results. |
| Path | Type | Required | Default / values | Description and constraints |
|---|
phase | table | required | - | Phase-rotation settings. Contains offsets for the first six harmonic components. |
phase.offsets | float or expression array · rad | required | - | Six harmonic phase offsets. Numeric expressions such as pi/2 are accepted. Constraints: must contain exactly 6 finite values |
| Path | Type | Required | Default / values | Description and constraints |
|---|
kerr | table | required | - | Kerr-angle conversion settings. Specifies the calibration sensor, calculation method, and final factor. |
kerr.sensor | integer | required | - | Sensor channel used for Kerr-angle calibration. The channel must also exist in the sensors array. Constraints: must reference sensors[].channel |
kerr.method | string enum | required | standard, harmonics | Kerr-angle calculation method. Selects the standard or harmonics-based analysis implementation. |
kerr.factor | float | required | - | Final Kerr-angle conversion factor. Applied after the selected Kerr-angle calculation. Constraints: must be finite |
| Path | Type | Required | Default / values | Description and constraints |
|---|
plot | table | optional | defaults | Plot generation settings. Controls display/save behavior, decimation, and error policy. |
plot.mode | string enum | optional | save; off, save, interactive, both | Plot output mode. Batch use normally selects save; interactive opens Matplotlib windows. |
plot.max_points | integer · points per series | optional | 100000 | Maximum points passed to plotting. Lower values improve Matplotlib responsiveness on large captures. Constraints: must be positive |
plot.decimation | string enum | optional | stride; none, stride, min_max | Plot downsampling algorithm. min_max preserves narrow extrema better than stride decimation. |
plot.on_error | string enum | optional | warn; warn, fail | Plot failure policy. Warn preserves successful analysis; fail makes plotting errors fatal. |
plot.output_dir | string | optional | absent | Deprecated plot directory compatibility field. Version 5 accepts but ignores this field; artifacts use the canonical run layout. Constraints: ignored with a warning |