Skip to content
Snippets Groups Projects
Commit 0196b2ac authored by Sander de Snoo's avatar Sander de Snoo
Browse files

Fixed inversion of measurement result when zero_on_high = True

parent 304c434b
No related branches found
No related tags found
No related merge requests found
......@@ -316,7 +316,7 @@ class MeasurementConverter:
continue
result = self._raw[i] > m.threshold
if m.zero_on_high:
result = ~result
result = result ^ 1
result = result.astype(int)
elif isinstance(m, measurement_expression):
result = m.expression.evaluate(last_result)
......
......@@ -201,7 +201,8 @@ class measurement_converter:
channel_name = m.acquisition_channel
result = self._channel_raw[channel_name][m.index] > m.threshold
if m.zero_on_high:
result = not result
# flip bit 0
result = result ^ 1
result = result.astype(int)
elif isinstance(m, measurement_expression):
result = m.expression.evaluate(last_result)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment