Signal Recovery DSP7265#
Control the Signal Recovery DSP7265 lock-in amplifier from Python with the DSP7265 driver.
Library: pymeasure (docs)
Type: Lock-in amplifiers
Manufacturer: Signal Recovery

Represents the Signal Recovery DSP 7265 lock-in amplifier.
Publishing through instro#
instro publishes the commands you send to a DSP7265 and the values you read from it, through any publisher. It takes two forms, both described in the pymeasure guide. Install with uv add "instro[pymeasure]".
With a PymeasureInstrument#
PymeasureInstrument wraps the driver in an instro instrument, with tags and background polling. The instrument is created inside the with block, and .device is the pymeasure instrument.
from pymeasure.instruments.signalrecovery import DSP7265
from instro.pymeasure import PymeasureInstrument
with PymeasureInstrument(
name="lockin7265",
instrument=DSP7265("GPIB0::12::INSTR"),
dataset_rid="<dataset rid>",
) as lockin7265:
lockin7265.device.imode = "voltage mode" # Set to measure voltages
lockin7265.device.reference = "internal" # Use internal oscillator
lockin7265.device.fet = 1 # Use FET pre-amp
lockin7265.device.shield = 0 # Ground shields
lockin7265.device.coupling = 0 # AC input coupling
lockin7265.device.time_constant = 0.10 # Filter time set to 100 ms
lockin7265.device.sensitivity = 2E-3 # Sensitivity set to 2 mV
lockin7265.device.frequency = 100 # Set oscillator frequency to 100 Hz
lockin7265.device.voltage = 1 # Set oscillator amplitude to 1 V
lockin7265.device.gain = 20 # Set AC gain to 20 dB
print(lockin7265.device.x) # Measure X channel voltage
lockin7265.device.shutdown() # Instrument shutdown
With existing pymeasure code (attach())#
attach() adds publishing to pymeasure code you already have. The imports, the attach() call after the instrument is created, and recorder.close() are all that instro adds.
from pymeasure.instruments.signalrecovery import DSP7265
from instro.lib import NominalCorePublisher
from instro.pymeasure import attach
lockin7265 = DSP7265("GPIB0::12::INSTR")
recorder = attach(lockin7265, "lockin7265", [NominalCorePublisher(dataset_rid="<dataset rid>")])
lockin7265.imode = "voltage mode" # Set to measure voltages
lockin7265.reference = "internal" # Use internal oscillator
lockin7265.fet = 1 # Use FET pre-amp
lockin7265.shield = 0 # Ground shields
lockin7265.coupling = 0 # AC input coupling
lockin7265.time_constant = 0.10 # Filter time set to 100 ms
lockin7265.sensitivity = 2E-3 # Sensitivity set to 2 mV
lockin7265.frequency = 100 # Set oscillator frequency to 100 Hz
lockin7265.voltage = 1 # Set oscillator amplitude to 1 V
lockin7265.gain = 20 # Set AC gain to 20 dB
print(lockin7265.x) # Measure X channel voltage
lockin7265.shutdown() # Instrument shutdown
recorder.close() # flush and close the publishers
The examples are adapted from the pymeasure documentation for DSP7265, which lists every property and method.
Send the data to Nominal#
With pymeasure, the Signal Recovery DSP7265 sends each reading to a Nominal dataset, where your team can plot it, compare runs, and analyze it together. This code creates an asset for the bench, a dataset and a run, and a workbook scoped to the run, then publishes the readings to the dataset. See Bench bring-up for the same steps on a whole bench.
from pymeasure.instruments.signalrecovery import DSP7265
from instro.lib import NominalCorePublisher
from instro.pymeasure import PymeasureInstrument
import pandas as pd
from nominal.core import NominalClient
client = NominalClient.from_profile("default")
bench = client.get_or_create_asset_by_properties(
{"bench_id": "bench-1"}, name="Bench 1"
)
dataset = bench.get_or_create_dataset("bench", name="Bench 1 instruments")
run = bench.create_run(
"Bench 1 session", start=pd.Timestamp.now(tz="UTC").floor("s"), end=None
)
dsp7265 = PymeasureInstrument(
name="dsp7265",
instrument=DSP7265("<visa_resource>"),
publishers=[NominalCorePublisher(dataset=dataset)],
)
workbook = run.create_workbook(title="Signal Recovery DSP7265 readings")
print(workbook.nominal_url) # open it to plot the channels
Open the Workbook link and plot the instrument’s channels, as in the mock below.
A workbook link looks like this: https://app.gov.nominal.io/w/[workbook_id]...