Exemple #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()
Exemple #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))

        #Old attribute dict
        self._attrdict = None
Exemple #3
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))
Exemple #4
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':'Downsampling Mode', 'key':'dsmode', 'type':'list', 'values':{'None':None, 'Subsample':'subsample', 'Mean':'mean', 'Peak':'peak'},
                'value':'peak', 'action':self.plotInputTrace},
            {'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()
Exemple #5
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':
                'Trace(s) to Plot',
                'key':
                'tracecmd',
                'type':
                'str',
                'value':
                '0',
                'help':
                '%namehdr%' +
                "Selects a trace or two to plot. You can specify ranges, individual traces, and colours. Example commands:\n"
                +
                " ==================== ========================================================== \n"
                + "  Plot Command          Result"
                "  0                     Plots trace #0\n" +
                "  0-10                  Plots trace #0 - #10 inclusive\n" +
                "  0, 2-5, 9             Plots trace #0, #2-5 inclusive, and #9\n"
                +
                "  0(r), 3-6(g), 22(b)   Plots trace #0 in red, #3-#6 in green, and #22 in blue\n"
                +
                "  2(#F005)              Plots trace #2 in red (RGB=F00) with Alpha of 0.3125\n"
                + "  3(#B0171F)            Plots trace #3 in 'india red'\n\n" +
                " ==================== ========================================================== \n"
                +
                "Colour strings are passed to pyqtgraph.mkPen as a string. This means you can specify the following:\n"
                +
                " =============== ========================================== \n"
                +
                "  Colour String    Description                             \n"
                +
                " =============== ========================================== \n"
                +
                "     c              One of  r, g, b, c, m, y, k, w         \n"
                +
                "     RGB            Hexadecimal string, may begin with #   \n"
                +
                "     RGBA           Hexadecimal string with alpha value    \n"
                +
                "     RRGGBB                                                \n"
                +
                "     RRGGBBAA                                              \n"
                +
                " =============== ========================================== \n"
            },
            {
                'name': 'Point Range',
                'key': 'pointrng',
                'type': 'rangegraph',
                'limits': (0, 0),
                'value': (0, 0),
                'graphwidget': self
            },
            {
                'name': 'Downsampling Mode',
                'key': 'dsmode',
                'type': 'list',
                'values': {
                    'None': None,
                    'Subsample': 'subsample',
                    'Mean': 'mean',
                    'Peak': 'peak'
                },
                'value': 'peak',
                'action': self.plotInputTrace
            },
            {
                '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':
                'T-Statistic',
                'key':
                'tstat',
                'type':
                'group',
                'expanded':
                True,
                'children': [
                    {
                        'name': 'Enable',
                        'key': 'enable',
                        'type': 'bool',
                        'value': False
                    },
                    {
                        'name': 'Leakage Type',
                        'key': 'type',
                        'type': 'list',
                        'values': ['Text In', 'Text Out', 'Key', 'None'],
                        'value': 'Text In'
                    },
                    {
                        'name': 'Trace Range',
                        'key': 'range',
                        'type': 'range',
                        'limits': (0, 0),
                        'value': (0, 0)
                    },
                ]
            },
            {
                '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()