Qudi
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
wavemeter_logger_logic.WavemeterLoggerLogic Class Reference

This logic module gathers data from wavemeter and the counter logic. More...

Inheritance diagram for wavemeter_logger_logic.WavemeterLoggerLogic:
Inheritance graph
[legend]
Collaboration diagram for wavemeter_logger_logic.WavemeterLoggerLogic:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, config, kwargs)
 Create WavemeterLoggerLogic 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 get_max_wavelength (self)
 Current maximum wavelength of the scan. More...
 
def get_min_wavelength (self)
 Current minimum wavelength of the scan. More...
 
def get_bins (self)
 Current number of bins in the spectrum. More...
 
def recalculate_histogram (self, bins=None, xmin=None, xmax=None)
 Recalculate the current spectrum from raw data. More...
 
def get_fit_functions (self)
 Return the names of all ocnfigured fit functions. More...
 
def do_fit (self)
 Execute the currently configured fit.
 
def start_scanning (self, resume=False)
 Prepare to start counting: zero variables, change state and start counting "loop". More...
 
def stop_scanning (self)
 Set a flag to request stopping counting.
 
def save_data (self, timestamp=None)
 Save the counter trace data and writes it to a file. More...
 
def draw_figure (self)
 Draw figure to save with data file. More...
 
def nm_to_ghz (self, wavelength)
 Convert wavelength to frequency. More...
 

Public Attributes

 threadlock
 
 counts_with_wavelength
 
 intern_xmax
 
 intern_xmin
 
 current_wavelength
 
 stopRequested
 
 fc
 
 histogram_axis
 
 histogram
 
 envelope_histogram
 
 wlog_fit_x
 
 wlog_fit_y
 
 hardware_thread
 
 last_point_time
 
 rawhisto
 
 sumhisto
 
 data_index
 
 recent_avg
 
 recent_count
 

Static Public Attributes

 sig_data_updated = QtCore.Signal()
 
 sig_update_histogram_next = QtCore.Signal(bool)
 
 sig_handle_timer = QtCore.Signal(bool)
 
 sig_new_data_point = QtCore.Signal(list)
 
 sig_fit_updated = QtCore.Signal()
 
 wavemeter1 = Connector(interface='WavemeterInterface')
 
 counterlogic = Connector(interface='CounterLogic')
 
 savelogic = Connector(interface='SaveLogic')
 
 fitlogic = Connector(interface='FitLogic')
 

Detailed Description

This logic module gathers data from wavemeter and the counter logic.

Constructor & Destructor Documentation

◆ __init__()

def wavemeter_logger_logic.WavemeterLoggerLogic.__init__ (   self,
  config,
  kwargs 
)

Create WavemeterLoggerLogic object with connectors.

Parameters
dictconfig: module configuration
dictkwargs: optional parameters

Member Function Documentation

◆ draw_figure()

def wavemeter_logger_logic.WavemeterLoggerLogic.draw_figure (   self)

Draw figure to save with data file.

Returns
: fig fig: a matplotlib figure object to be saved to file.

◆ get_bins()

def wavemeter_logger_logic.WavemeterLoggerLogic.get_bins (   self)

Current number of bins in the spectrum.

Returns
int: current number of bins in the scan

◆ get_fit_functions()

def wavemeter_logger_logic.WavemeterLoggerLogic.get_fit_functions (   self)

Return the names of all ocnfigured fit functions.

Returns
list(str): list of fit function names

◆ get_max_wavelength()

def wavemeter_logger_logic.WavemeterLoggerLogic.get_max_wavelength (   self)

Current maximum wavelength of the scan.

Returns
float: current maximum wavelength

◆ get_min_wavelength()

def wavemeter_logger_logic.WavemeterLoggerLogic.get_min_wavelength (   self)

Current minimum wavelength of the scan.

Returns
float: current minimum wavelength

◆ nm_to_ghz()

def wavemeter_logger_logic.WavemeterLoggerLogic.nm_to_ghz (   self,
  wavelength 
)

Convert wavelength to frequency.

Parameters
floatwavelength: vacuum wavelength
Returns
float: freequency

◆ recalculate_histogram()

def wavemeter_logger_logic.WavemeterLoggerLogic.recalculate_histogram (   self,
  bins = None,
  xmin = None,
  xmax = None 
)

Recalculate the current spectrum from raw data.

int bins: new number of bins

Parameters
floatxmin: new minimum wavelength
floatxmax: new maximum wavelength

◆ save_data()

def wavemeter_logger_logic.WavemeterLoggerLogic.save_data (   self,
  timestamp = None 
)

Save the counter trace data and writes it to a file.

Parameters
datetimetimestamp: timestamp passed from gui so that saved images match filenames of data. This will be removed when savelogic handles the image creation also.
Returns
int: error code (0:OK, -1:error)

◆ start_scanning()

def wavemeter_logger_logic.WavemeterLoggerLogic.start_scanning (   self,
  resume = False 
)

Prepare to start counting: zero variables, change state and start counting "loop".

Parameters
boolresume: whether to resume measurement

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