Esempio n. 1
0
    def __init__(self, name=None):
        GraphWidget.__init__(self)
        if name is not None:
            self._name = name
        ActiveTraceObserver.__init__(self)

        self.params.addChildren([
            {'name':'Redraw after Each', 'type':'bool', 'value':False},
            {'name':'Trace Range', 'key':'tracerng', 'type':'range', 'limits':(0, 0), 'value':(0, 0)},
            {'name':'Point Range', 'key':'pointrng', 'type':'rangegraph', 'limits':(0, 0), 'value':(0, 0), 'graphwidget':self},
            {'name':'Y Axis', 'type':'group', 'expanded':False, 'children':[
                {'name':'Unity', 'type':'list', 'values':{"None":"", "Voltage":"V", "Current":"A"}, 'value':"", 'action':self.plotInputTrace},
                {'name':'Scale Factor', 'type':'float', 'limits':(1E-9, 1E9), 'value':1.0, 'action':self.plotInputTrace},
                {'name':'Offset Factor', 'type':'float', 'limits':(-1E9, 1E9), 'value':0.0, 'action':self.plotInputTrace},
            ]},
            {'name':'X Axis', 'type':'list', 'values':{"Sample":"Pts.", "Time":"s"}, 'value':"Pts.", 'action':self.plotInputTrace},
            {'name':'Redraw', 'type':'action', 'action':self.plotInputTrace},
        ])

        self.findParam('input').setValue(TraceSource.registeredObjects["Trace Management"])
        TraceSource.sigRegisteredObjectsChanged.connect(self.traceSourcesChanged)

        self.resetTraceLimits()
        self.setDefaultYRange(-0.5, 0.5)
        self.YDefault()
Esempio n. 2
0
    def __init__(self, traceSource=None):
        self.enabled = False
        ActiveTraceObserver.__init__(self)
        TraceSource.__init__(self, self.getName())
        AutoScript.__init__(self)
        self.setTraceSource(traceSource, blockSignal=True)
        if traceSource:
            traceSource.sigTracesChanged.connect(
                self.sigTracesChanged.emit
            )  # Forwards the traceChanged signal to the next observer in the chain
        self.getParams().addChildren(
            [
                {
                    "name": "Enabled",
                    "key": "enabled",
                    "type": "bool",
                    "default": self.getEnabled(),
                    "get": self.getEnabled,
                    "set": self.setEnabled,
                }
            ]
        )
        self.findParam("input").hide()

        self.register()
        if __debug__:
            logging.debug("Created: " + str(self))
Esempio n. 3
0
 def __init__(self, parentParam=None, traceSource=None):
     self.enabled = False
     ActiveTraceObserver.__init__(self, parentParam=parentParam)
     TraceSource.__init__(self, self.getName())
     AutoScript.__init__(self)
     self.setTraceSource(traceSource, blockSignal=True)
     if traceSource:
         traceSource.sigTracesChanged.connect(self.sigTracesChanged.emit)  # Forwards the traceChanged signal to the next observer in the chain
     self.getParams().addChildren([
              {'name':'Enabled', 'key':'enabled', 'type':'bool', 'default':self.getEnabled(), 'get':self.getEnabled, 'set':self.setEnabled}
     ])
     self.findParam('input').hide()
    def __init__(self, parentParam=None, name=None):
        GraphWidget.__init__(self)
        if name is not None:
            self._name = name
        ActiveTraceObserver.__init__(self)

        self.params.addChildren([
            {'name':'Redraw after Each', 'type':'bool', 'value':False},
            {'name':'Trace Range', 'key':'tracerng', 'type':'range', 'limits':(0, 0), 'value':(0, 0)},
            {'name':'Point Range', 'key':'pointrng', 'type':'rangegraph', 'limits':(0, 0), 'value':(0, 0), 'graphwidget':self},
            {'name':'Redraw', 'type':'action', 'action':lambda _: self.plotInputTrace()},
        ])

        self.findParam('input').setValue(TraceSource.registeredObjects["Trace Management"])
        TraceSource.sigRegisteredObjectsChanged.connect(self.traceSourcesChanged)

        self.resetTraceLimits()
        self.setDefaultYRange(-0.5, 0.5)
        self.YDefault()
    def __init__(self, name=None):
        GraphWidget.__init__(self)
        if name is not None:
            self._name = name
        ActiveTraceObserver.__init__(self)

        self.params.addChildren([
            {
                'name': 'Redraw after Each',
                'type': 'bool',
                'value': False
            },
            {
                'name': 'Trace Range',
                'key': 'tracerng',
                'type': 'range',
                'limits': (0, 0),
                'value': (0, 0)
            },
            {
                'name': 'Point Range',
                'key': 'pointrng',
                'type': 'rangegraph',
                'limits': (0, 0),
                'value': (0, 0),
                'graphwidget': self
            },
            {
                'name':
                'Y Axis',
                'type':
                'group',
                'expanded':
                False,
                'children': [
                    {
                        'name': 'Unity',
                        'type': 'list',
                        'values': {
                            "None": "",
                            "Voltage": "V",
                            "Current": "A"
                        },
                        'value': "",
                        'action': self.plotInputTrace
                    },
                    {
                        'name': 'Scale Factor',
                        'type': 'float',
                        'limits': (1E-9, 1E9),
                        'value': 1.0,
                        'action': self.plotInputTrace
                    },
                    {
                        'name': 'Offset Factor',
                        'type': 'float',
                        'limits': (-1E9, 1E9),
                        'value': 0.0,
                        'action': self.plotInputTrace
                    },
                ]
            },
            {
                'name': 'X Axis',
                'type': 'list',
                'values': {
                    "Sample": "Pts.",
                    "Time": "s"
                },
                'value': "Pts.",
                'action': self.plotInputTrace
            },
            {
                'name': 'Redraw',
                'type': 'action',
                'action': self.plotInputTrace
            },
        ])

        self.findParam('input').setValue(
            TraceSource.registeredObjects["Trace Management"])
        TraceSource.sigRegisteredObjectsChanged.connect(
            self.traceSourcesChanged)

        self.resetTraceLimits()
        self.setDefaultYRange(-0.5, 0.5)
        self.YDefault()