def __init__(self,parent,scan): # name of independent variable input = scan[INPUT] x_label = input.get(NAME,'input') x_units = input.get(UNITS,'arb') # name of dependent variable output = scan[OUTPUT] if type(output) is dict: y_label = output.get(NAME,'output') y_units = output.get(UNITS,'arb') else: y_label = 'output' y_units = 'arb' # scan title title = scan.get( NAME, '%s vs. %s' % (y_label,x_label) ) labels = { 'bottom':'%s (%s)' % (x_label,x_units), 'left':'%s (%s)' % (y_label,y_units) } # initialize pyqtgraph plot item with title and axis labels PlotItem.__init__( self, title = title, labels = labels ) # are we setting input to optimal value of scan result? self.optimizing = scan.get(OPTIMIZE,False) # if we have multiple outputs and are optimizing, which output to optimize? self.checking_optimize = scan.get(CHECK_OPTIMIZE,False) self.click_deferred = None self.optimize_axis = scan.get(OPTIMIZE_AXIS,0) # are we saving scan data to datavault? self.saving = scan.get(SAVE,False) # are we returning to input's original position after scan? self.returning = scan.get(RETURN,False) self.scan = scan self.__parent = parent
def __init__(self, Node): PlotItem.__init__(self) self.setMinimumSize(300, 300) NodeView.__init__(self, Node)