diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-09 15:15:56 -0500 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-09 15:15:56 -0500 |
commit | f2d02880a3c0c8b4f7a0959d4e8e1e6eccc52518 (patch) | |
tree | 8890f371ad5a2cc31df7a031f93b2c6c145ecd58 /qolab/hardware/scope/__init__.py | |
parent | 4e4bff72bef3f67cb39f8bc6e066fd2c31edd1f5 (diff) | |
download | qolab-f2d02880a3c0c8b4f7a0959d4e8e1e6eccc52518.tar.gz qolab-f2d02880a3c0c8b4f7a0959d4e8e1e6eccc52518.zip |
redone configuration creation for a scope
Diffstat (limited to 'qolab/hardware/scope/__init__.py')
-rw-r--r-- | qolab/hardware/scope/__init__.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/qolab/hardware/scope/__init__.py b/qolab/hardware/scope/__init__.py index 3ab2a2e..f5e7ba2 100644 --- a/qolab/hardware/scope/__init__.py +++ b/qolab/hardware/scope/__init__.py @@ -11,6 +11,9 @@ class Scope: # Minimal set of methods to be implemented by a scope. def __init__(self): + self.config={} + self.config['Device type'] = 'Scope' + self.config['Device model'] = 'Generic Scope Without Hardware interface' self.numberOfChannels = 0 self.fname_prefix = 'scope' self.savepath = './scope' @@ -29,12 +32,13 @@ class Scope: def getAllTraces(self, availableNpnts=None, maxRequiredPoints=None): 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) ) return( allTraces ) def getConfig(self): - config = {} + config = self.config.copy() dconfig = {} dconfig['id'] = self.idn for p in self.deviceProperties: @@ -44,7 +48,7 @@ class Scope: continue res = getattr(self, getter)() dconfig[p] = res - config['Device'] = dconfig + config['DeviceConfig'] = dconfig chconfig = {} for chNum in range(1, self.numberOfChannels+1): chNconfig = {} @@ -56,7 +60,7 @@ class Scope: res = getattr(self, getter)(chNum) chNconfig[p] = res chconfig[chNum] = chNconfig - config['Channels']=chconfig + config['ChannelsConfig']=chconfig return config def getHeader(self): |