aboutsummaryrefslogtreecommitdiffstats
path: root/amplitude_ramp.py
diff options
context:
space:
mode:
Diffstat (limited to 'amplitude_ramp.py')
-rwxr-xr-xamplitude_ramp.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/amplitude_ramp.py b/amplitude_ramp.py
index f6d1c5b..a80dbf7 100755
--- a/amplitude_ramp.py
+++ b/amplitude_ramp.py
@@ -188,6 +188,7 @@ class RampGenerator(threading.Thread):
self.in_queue_ = Queue()
self.num_meas = int(options.num_meas)
+ self.num_meas_to_skip = int(options.num_meas_to_skip)
self.ampl_start = float(options.ampl_start)
self.ampl_step = float(options.ampl_step)
self.ampl_stop = float(options.ampl_stop)
@@ -229,6 +230,10 @@ class RampGenerator(threading.Thread):
phase_diff_sum = 0
mag_feedback_sum = 0
+ for measurement_ignore in range(self.num_meas_to_skip):
+ # Receive and ignore three floats on the socket
+ sock.recv(12)
+
for measurement_ix in range(self.num_meas):
# Receive three floats on the socket
mag_gen, phase_diff, mag_feedback = struct.unpack(
@@ -280,6 +285,11 @@ parser.add_argument('--num-meas',
help='number of measurements per amplitude',
required=False)
+parser.add_argument('--num-meas-to-skip',
+ default='50',
+ help='After each amplitude change, ignore num-meas-to-skip measurements',
+ required=False)
+
cli_args = parser.parse_args()
rampgen = RampGenerator(cli_args)