diff options
Diffstat (limited to 'qolab/hardware/scope/_basic.py')
-rw-r--r-- | qolab/hardware/scope/_basic.py | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/qolab/hardware/scope/_basic.py b/qolab/hardware/scope/_basic.py index c0a6f13..e67e6af 100644 --- a/qolab/hardware/scope/_basic.py +++ b/qolab/hardware/scope/_basic.py @@ -10,9 +10,24 @@ from qolab.data.trace import TraceSetSameX def calcSparsingAndNumPoints(self, availableNpnts=None, maxRequiredPoints=None): + """Calculate sparcing and number of sparced points. + + Parameters + ---------- + availableNpnts: int or None + Number of available points. If set to None exit with error + maxRequiredPoints: int or (None) + number of requested points after decimation. + If availableNpnts< maxRequiredPoints*2, + decimation is impossible and we will get up to factor of 2 more + than requested. + + Return + ------ + (sparsing, Npnts, availableNpnts, maxRequiredPoints) + """ if availableNpnts is None: - # using channel 1 to get availableNpnts - availableNpnts = self.getAvailableNumberOfPoints(1) + raise ValueError("Invalid availableNpnts value, must be int.") if maxRequiredPoints is None: maxRequiredPoints = self.maxRequiredPoints |