diff options
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): |