aboutsummaryrefslogtreecommitdiff
path: root/qolab/hardware/scope/__init__.py
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2021-12-12 14:33:15 -0500
committerEugeniy E. Mikhailov <evgmik@gmail.com>2021-12-12 14:33:15 -0500
commitba880155abe63aef046f941b238f905e8b1c52cf (patch)
tree8ceccddb10bb727b6f983e29916dee97ecc601c2 /qolab/hardware/scope/__init__.py
parentfd715c5edfd06fcb106ddbb3c9eadd79a96a37a7 (diff)
downloadqolab-ba880155abe63aef046f941b238f905e8b1c52cf.tar.gz
qolab-ba880155abe63aef046f941b238f905e8b1c52cf.zip
scope now can decimate points with smoothing
Diffstat (limited to 'qolab/hardware/scope/__init__.py')
-rw-r--r--qolab/hardware/scope/__init__.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/qolab/hardware/scope/__init__.py b/qolab/hardware/scope/__init__.py
index c573edf..ae311d1 100644
--- a/qolab/hardware/scope/__init__.py
+++ b/qolab/hardware/scope/__init__.py
@@ -25,16 +25,16 @@ class Scope(BasicInstrument):
# i.e. VoltsPerDiv -> getChanVoltsPerDiv(chNum) and setSampleRate(chNum, value)
self.channelProperties = ['VoltsPerDiv', 'Offset', ]
- def getTrace(self, chNum, availableNpnts=None, maxRequiredPoints=None):
+ def getTrace(self, chNum, availableNpnts=None, maxRequiredPoints=None, decimate=True):
# Should work with minimal arguments list
# but might be faster if parameters provided: less IO requests
warnings.warn( 'this function is not implemented' )
- def getAllTraces(self, availableNpnts=None, maxRequiredPoints=None):
+ def getAllTraces(self, availableNpnts=None, maxRequiredPoints=None, decimate=True):
allTraces=TraceSetSameX('scope traces')
allTraces.config['tags']['DAQ']=self.getConfig()
for chNum in range(1, self.numberOfChannels+1):
- allTraces.addTrace( self.getTrace(chNum, availableNpnts, maxRequiredPoints) )
+ allTraces.addTrace( self.getTrace(chNum, availableNpnts=availableNpnts, maxRequiredPoints=maxRequiredPoints, decimate=decimate) )
return( allTraces )
def plot(self, **kwargs):
@@ -63,8 +63,8 @@ class Scope(BasicInstrument):
return header
- def save(self, fname=None, item_format='e', availableNpnts=None, maxRequiredPoints=None, extention='dat'):
- allTraces = self.getAllTraces(availableNpnts=availableNpnts, maxRequiredPoints=maxRequiredPoints)
+ def save(self, fname=None, item_format='e', availableNpnts=None, maxRequiredPoints=None, decimate=True, extention='dat'):
+ allTraces = self.getAllTraces(availableNpnts=availableNpnts, maxRequiredPoints=maxRequiredPoints, decimate=decimate)
if fname is None:
fname = get_next_data_file(self.config['FnamePrefix'], self.config['SavePath'], extention=extention)
allTraces.save(fname, item_format=item_format)