diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2024-07-24 10:16:21 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2024-07-24 10:16:21 -0400 |
commit | 81447d92c4d29aac9271c5f8ffce3aab68e765b5 (patch) | |
tree | 9c6d350f173a6c8ff1e1def910c2f937fcca30fb /qolab/hardware/scope | |
parent | 01a24807c53086106ad675cedef84ab3bac0ad77 (diff) | |
download | qolab-81447d92c4d29aac9271c5f8ffce3aab68e765b5.tar.gz qolab-81447d92c4d29aac9271c5f8ffce3aab68e765b5.zip |
bug fix: first change scale then offset
apparently on Rigol scope offset stored in units of
volts per division (or something similar). So
order of operations is important.
Diffstat (limited to 'qolab/hardware/scope')
-rw-r--r-- | qolab/hardware/scope/_basic.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qolab/hardware/scope/_basic.py b/qolab/hardware/scope/_basic.py index 7cabf3b..751026d 100644 --- a/qolab/hardware/scope/_basic.py +++ b/qolab/hardware/scope/_basic.py @@ -212,10 +212,10 @@ class Scope(BasicInstrument): vPerDiv = signal_range / (self.vertDivOnScreen * (1 - margin * 1.2)) if vPerDiv < self.minVoltsPerDiv: vPerDiv = self.minVoltsPerDiv - logger.debug(f"Auto Scaler Requesting {offset=} for {chNum=}.") - self.setChanVoltageOffset(chNum, offset) logger.debug(f"Auto Scaler Requesting {vPerDiv=} for {chNum=}.") self.setChanVoltsPerDiv(chNum, vPerDiv) + logger.debug(f"Auto Scaler Requesting {offset=} for {chNum=}.") + self.setChanVoltageOffset(chNum, offset) relOffsetChange = abs(old_offset - offset) / old_vPerDiv relVperDivChange = abs(old_vPerDiv - vPerDiv) / old_vPerDiv if (relOffsetChange < 0.5) and (relVperDivChange < 0.05): |