aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2024-07-20 18:23:06 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2024-07-20 18:24:09 -0400
commit84c0078d8bec0007dd883e140e8d09f1f378be5d (patch)
treea0ff4186c590413be11524b581cc145d4723fb4d
parentb4ffce697aecef283260b00d1c56baf78e885219 (diff)
downloadqolab-84c0078d8bec0007dd883e140e8d09f1f378be5d.tar.gz
qolab-84c0078d8bec0007dd883e140e8d09f1f378be5d.zip
added protection from unset maxRequiredPoints
-rw-r--r--qolab/hardware/scope/_basic.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/qolab/hardware/scope/_basic.py b/qolab/hardware/scope/_basic.py
index acb7687..bb655a0 100644
--- a/qolab/hardware/scope/_basic.py
+++ b/qolab/hardware/scope/_basic.py
@@ -15,9 +15,9 @@ def calcSparsingAndNumPoints(availableNpnts=None, maxRequiredPoints=None):
Parameters
----------
- availableNpnts: int or None
+ availableNpnts: int or None (throws error)
Number of available points. If set to None exit with error
- maxRequiredPoints: int or (None)
+ maxRequiredPoints: int or None (throws error)
number of requested points after decimation.
If availableNpnts< maxRequiredPoints*2,
decimation is impossible and we will get up to factor of 2 more
@@ -30,7 +30,7 @@ def calcSparsingAndNumPoints(availableNpnts=None, maxRequiredPoints=None):
if availableNpnts is None:
raise ValueError("Invalid availableNpnts value, must be int.")
if maxRequiredPoints is None:
- maxRequiredPoints = self.maxRequiredPoints
+ raise ValueError("Invalid maxRequiredPoints value, must be int.")
if availableNpnts <= maxRequiredPoints * 2:
Npnts = availableNpnts