InstroScope#
- class InstroScope(
- name: str | None = None,
- driver: ScopeDriverBase | None = None,
- num_channels: int | None = None,
- publishers: list[Publisher] | None = None,
- config: ScopeConfig | dict | Path | str | None = None,
- autostart: bool = False,
- **kwargs,
Bases:
InstrumentOscilloscope instrument. Tracks scope state locally; call
sync_configuration()afteropen()to refresh.Initialize an InstroScope.
Provide either
configordriver/num_channelstogether, not both.- Parameters:
name – Channel-name prefix for published data. Falls back to
config.device.namewhenconfigis given.driver –
Concrete scope driver; owns its own transport:
scope = InstroScope( "scope", driver=Keysight1200X("<visa_resource>"), num_channels=4, )
num_channels – Analog-input channel count.
publishers – Publishers that receive emitted Measurement/Command data. Combined with any publishers declared in
config.config – A
ScopeConfig, a dict, or a path to a JSON config file. Itschannels,acquisition, andtriggerblocks are applied through the public setters onopen(); each channel’smeasurementsare registered as background daemon functions.autostart – When True, open the connection and start background polling. Requires
configwith at least onemeasurementsentry, since the daemon has nothing to poll otherwise.**kwargs – Default tags applied to every emitted Measurement/Command. Pass
dataset_rid="<rid>"to auto-create a NominalCorePublisher (uses the on-disk ‘default’ Nominal credential).
Attributes
Seconds between background daemon iterations (0 = no wait). |
|
Return an insertion-ordered snapshot of all published channel names. |
Methods
Append |
|
Register a publisher to receive this instrument's Measurement/Command data. |
|
Stop the daemon and publishers, then close the underlying driver. |
|
Replace all daemon functions with a single |
|
Fetch the acquired waveform from |
|
Force a trigger event immediately. |
|
Query the current acquisition mode (published as a string). |
|
Query RUNNING/STOPPED. |
|
Query the average count. |
|
Return the most recent |
|
Query the input coupling mode on |
|
Query the timebase (seconds/div). |
|
Query the probe attenuation ratio on |
|
Query the current sample rate (Sa/s). |
|
Return the most recent sample for |
|
Query the trigger status (published as a string). |
|
Query the vertical offset (volts) on |
|
Query the vertical scale (V/div) on |
|
Recall a scope setup. |
|
Take a built-in measurement on |
|
Open the underlying driver and apply any configured initial state. |
|
Fan |
|
Start continuous acquisition. |
|
Capture a screenshot and save it. |
|
Save scope setup. |
|
Set the acquisition mode (NORMAL/AVERAGE/HIRES/PEAK_DETECT/ENVELOPE). |
|
Set the average count (waveforms averaged) used in AVERAGE acquisition mode. |
|
Set AC/DC input coupling on |
|
Set the timebase (seconds/div). |
|
Set the probe attenuation ratio (e.g. 1, 10, 100) on |
|
Set the trigger level (volts). |
|
Set the trigger mode (AUTO/NORMAL). |
|
Set the trigger edge slope (RISING/FALLING/EITHER). |
|
Set the trigger source to |
|
Set the trigger type (EDGE, PULSE, …). |
|
Set the vertical offset (volts) on |
|
Set the vertical scale (V/div) on |
|
Arm a single-shot acquisition. |
|
Start the background daemon; warns when nothing is registered to poll. |
|
Signal the background daemon to stop and join it. |
|
Stop acquisition; records the acquisition timestamp if one was armed. |
|
Bulk-query the instrument and overwrite the tracked |