From 5ec8d4f418cc2bbe1dc9a7d9cece6a8ef912eff6 Mon Sep 17 00:00:00 2001 From: Bob Date: Mon, 2 Nov 2020 14:38:49 +0100 Subject: [PATCH 1/2] Bugfix on customlockbox_example --- .../lockbox/models/custom_lockbox_example.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyrpl/software_modules/lockbox/models/custom_lockbox_example.py b/pyrpl/software_modules/lockbox/models/custom_lockbox_example.py index 49bf6b3b6..7232e63a0 100644 --- a/pyrpl/software_modules/lockbox/models/custom_lockbox_example.py +++ b/pyrpl/software_modules/lockbox/models/custom_lockbox_example.py @@ -30,13 +30,13 @@ def expected_slope(self, variable): # A customized calibration method can be used to implement custom calibrations. The calibration method of the # InputSignal class retrieves min, max, mean, rms of the input signal during a sweep and saves them as class # attributes, such that they can be used by expected_signal(). - def calibrate(self): + def calibrate(self): """ This is a simplified calibration method. InputSignal.calibrate works better than this in most cases. """ self.lockbox.sweep() # get a curve of the signal during the sweep - curve = self.sweep_acquire() + curve,_ = self.sweep_acquire() # fill self.mean, min, max, rms with values from acquired curve. - self.get_stats_from_curve(curve=curve) + self.calibration_data.get_stats_from_curve(curve=curve) class CustomLockbox(Lockbox): From 172c1709dcf4951f5023b52193b385390dff63a5 Mon Sep 17 00:00:00 2001 From: lneuhaus Date: Tue, 17 Nov 2020 11:01:36 +0100 Subject: [PATCH 2/2] Update pyrpl/software_modules/lockbox/models/custom_lockbox_example.py --- pyrpl/software_modules/lockbox/models/custom_lockbox_example.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrpl/software_modules/lockbox/models/custom_lockbox_example.py b/pyrpl/software_modules/lockbox/models/custom_lockbox_example.py index 7232e63a0..aa3196bf9 100644 --- a/pyrpl/software_modules/lockbox/models/custom_lockbox_example.py +++ b/pyrpl/software_modules/lockbox/models/custom_lockbox_example.py @@ -30,7 +30,7 @@ def expected_slope(self, variable): # A customized calibration method can be used to implement custom calibrations. The calibration method of the # InputSignal class retrieves min, max, mean, rms of the input signal during a sweep and saves them as class # attributes, such that they can be used by expected_signal(). - def calibrate(self): + def calibrate(self): """ This is a simplified calibration method. InputSignal.calibrate works better than this in most cases. """ self.lockbox.sweep() # get a curve of the signal during the sweep