From e904aedb260e32270bd772de2349185cae9f8682 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Sun, 26 Dec 2021 18:25:52 -0500 Subject: more general scope initialization --- qolab/hardware/scope/__init__.py | 8 ++++---- qolab/hardware/scope/sds1104x.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/qolab/hardware/scope/__init__.py b/qolab/hardware/scope/__init__.py index bced5a6..d4e31a8 100644 --- a/qolab/hardware/scope/__init__.py +++ b/qolab/hardware/scope/__init__.py @@ -11,8 +11,8 @@ import yaml class Scope(BasicInstrument): # Minimal set of methods to be implemented by a scope. - def __init__(self): - BasicInstrument.__init__(self) + def __init__(self, *args, **kwds): + BasicInstrument.__init__(self, *args, **kwds) self.config['Device type']='Scope' self.config['Device model'] = 'Generic Scope Without Hardware interface' self.config['FnamePrefix'] = 'scope' @@ -77,9 +77,9 @@ class ScopeSCPI(SCPIinstr, Scope): rm = pyvisa.ResourceManager() ScopeSCPI(rm.open_resource('TCPIP::192.168.0.2::INSTR')) """ - def __init__(self, resource): + def __init__(self, resource, *args, **kwds): SCPIinstr.__init__(self, resource) - Scope.__init__(self) + Scope.__init__(self, *args, **kwds) self.config['DeviceId'] = str.strip(self.idn) from .sds1104x import SDS1104X diff --git a/qolab/hardware/scope/sds1104x.py b/qolab/hardware/scope/sds1104x.py index 63895f6..c41c53a 100644 --- a/qolab/hardware/scope/sds1104x.py +++ b/qolab/hardware/scope/sds1104x.py @@ -12,8 +12,8 @@ class SDS1104X(ScopeSCPI): """ Siglent SDS1104x scope """ vertDivOnScreen = 10 horizDivOnScreen = 14 - def __init__(self, resource): - super().__init__(resource) + def __init__(self, resource, *args, **kwds): + super().__init__(resource, *args, **kwds) self.config['Device model'] = 'SDS1104X' self.resource.read_termination='\n' self.numberOfChannels = 4 -- cgit v1.2.3