From bc6707e1b4f21fada8dfc26955ad31f75bee31d3 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Sun, 21 Jul 2024 00:29:40 -0400 Subject: black format --- qolab/hardware/scope/rigolds1054z.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'qolab/hardware/scope/rigolds1054z.py') diff --git a/qolab/hardware/scope/rigolds1054z.py b/qolab/hardware/scope/rigolds1054z.py index e4ed65d..6ac51c5 100644 --- a/qolab/hardware/scope/rigolds1054z.py +++ b/qolab/hardware/scope/rigolds1054z.py @@ -276,11 +276,13 @@ class RigolDS1054z(ScopeSCPI): # sampleRate = self.getSampleRate() timePerDiv = self.getTimePerDiv() # trigDelay = self.getTrigDelay() - availableNpnts = rawChanCfg['availableNpnts'] - sparsing = rawChanCfg['sparsing'] - Npnts = rawChanCfg['Npnts'] - ind = np.linspace(0, Npnts-1, Npnts) - tval = (ind - rawChanCfg['xreference'] ) * rawChanCfg['xincrement']*sparsing - rawChanCfg['xorigin'] + availableNpnts = rawChanCfg["availableNpnts"] + sparsing = rawChanCfg["sparsing"] + Npnts = rawChanCfg["Npnts"] + ind = np.linspace(0, Npnts - 1, Npnts) + tval = (ind - rawChanCfg["xreference"]) * rawChanCfg[ + "xincrement" + ] * sparsing - rawChanCfg["xorigin"] t = Trace("time") t.values = tval.reshape(tval.size, 1) t.config["unit"] = "S" @@ -309,8 +311,10 @@ class RigolDS1054z(ScopeSCPI): VoltageOffset = self.getChanVoltageOffset(chNum) VoltsPerDiv = self.getChanVoltsPerDiv(chNum) tr = trRaw - tr.values = (trRaw.values - rawChanCfg['yreference'] - rawChanCfg['yorigin']) * rawChanCfg['yincrement'] - + tr.values = ( + trRaw.values - rawChanCfg["yreference"] - rawChanCfg["yorigin"] + ) * rawChanCfg["yincrement"] + tr.config["unit"] = "Volt" tr.config["tags"]["VoltageOffset"] = VoltageOffset tr.config["tags"]["VoltsPerDiv"] = VoltsPerDiv -- cgit v1.2.3