Qudi
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
qdplot_logic.QdplotLogic Class Reference

This logic module helps display user data in plots, and makes it easy to save. More...

Inheritance diagram for qdplot_logic.QdplotLogic:
Inheritance graph
[legend]
Collaboration diagram for qdplot_logic.QdplotLogic:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, kwargs)
 Create QdplotLogic object with connectors. More...
 
def on_activate (self)
 Initialisation performed during activation of the module.
 
def on_deactivate (self)
 Deinitialisation performed during deactivation of the module.
 
def set_data (self, x=None, y=None, clear_old=True)
 Set the data to plot. More...
 
def set_domain (self, newdomain=None)
 Set the plot domain, to match the data (default) or to a specified new domain. More...
 
def set_range (self, newrange=None)
 Set the plot range, to match the data (default) or to a specified new range. More...
 
def set_hlabel (self, label='Independent variable', units='arb. units')
 Set the horizontal axis label and specify units. More...
 
def set_vlabel (self, label='Dependent variable', units='arb. units')
 Set the vertical axis label and specify units. More...
 
def get_domain (self)
 
def get_range (self)
 
def save_data (self, postfix='')
 Save the data to a file. More...
 

Public Attributes

 threadlock
 
 indep_vals
 
 depen_vals
 
 plot_domain
 
 plot_range
 
 clear_old
 
 h_label
 
 h_units
 
 v_label
 
 v_units
 

Static Public Attributes

 sigPlotDataUpdated = QtCore.Signal()
 
 sigPlotParamsUpdated = QtCore.Signal()
 
 savelogic = Connector(interface='SaveLogic')
 

Detailed Description

This logic module helps display user data in plots, and makes it easy to save.

sigCounterUpdate: there is new counting data available sigCountContinuousNext: used to simulate a loop in which the data acquisition runs. sigCountGatedNext: ???

Constructor & Destructor Documentation

◆ __init__()

def qdplot_logic.QdplotLogic.__init__ (   self,
  kwargs 
)

Create QdplotLogic object with connectors.

Parameters
dictkwargs: optional parameters

Member Function Documentation

◆ save_data()

def qdplot_logic.QdplotLogic.save_data (   self,
  postfix = '' 
)

Save the data to a file.

Parameters
boolto_file: indicate, whether data have to be saved to file
strpostfix: an additional tag, which will be added to the filename upon save
Returns
np.array([2 or 3][X]), OrderedDict: array with the

◆ set_data()

def qdplot_logic.QdplotLogic.set_data (   self,
  x = None,
  y = None,
  clear_old = True 
)

Set the data to plot.

Parameters
np.ndarrayor list of np.ndarrays x: data of independents variable(s)
np.ndarrayor list of np.ndarrays y: data of dependent variable(s)
boolclear_old: clear old plots in GUI if True

◆ set_domain()

def qdplot_logic.QdplotLogic.set_domain (   self,
  newdomain = None 
)

Set the plot domain, to match the data (default) or to a specified new domain.

Parameters
floatnewdomain: 2-element list containing min and max x-values

◆ set_hlabel()

def qdplot_logic.QdplotLogic.set_hlabel (   self,
  label = 'Independent variable',
  units = 'arb. units' 
)

Set the horizontal axis label and specify units.

Parameters
stringlabel: name of axis
stringunits: symbol for units

◆ set_range()

def qdplot_logic.QdplotLogic.set_range (   self,
  newrange = None 
)

Set the plot range, to match the data (default) or to a specified new range.

Parameters
floatnewrange: 2-element list containing min and max y-values

◆ set_vlabel()

def qdplot_logic.QdplotLogic.set_vlabel (   self,
  label = 'Dependent variable',
  units = 'arb. units' 
)

Set the vertical axis label and specify units.

Parameters
stringlabel: name of axis
stringunits: symbol for units

The documentation for this class was generated from the following file: