Qudi
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
spectrum.SpectrumLogic Class Reference

This logic module gathers data from the spectrometer. More...

Inheritance diagram for spectrum.SpectrumLogic:
Inheritance graph
[legend]
Collaboration diagram for spectrum.SpectrumLogic:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, kwargs)
 Create SpectrometerLogic 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 sv_set_fits (self, val)
 Set up fit container.
 
def sv_get_fits (self, val)
 save configured fits
 
def get_single_spectrum (self, background=False)
 Record a single spectrum from the spectrometer.
 
def spectrum_data (self)
 
def background_correction (self)
 
def background_correction (self, correction=None)
 
def save_raw_spectrometer_file (self, path='', postfix='')
 Ask the hardware device to save its own raw file.
 
def start_differential_spectrum (self)
 Start a differential spectrum acquisition. More...
 
def resume_differential_spectrum (self)
 Resume a differential spectrum acquisition.
 
def stop_differential_spectrum (self)
 Stop an ongoing differential spectrum acquisition.
 
def toggle_modulation (self, on)
 Toggle the modulation.
 
def save_spectrum_data (self, background=False, name_tag='', custom_header=None)
 Saves the current spectrum data to a file. More...
 
def draw_figure (self)
 Draw the summary plot to save with the data. More...
 
def get_fit_functions (self)
 Fitting things. More...
 
def do_fit (self, fit_function=None, x_data=None, y_data=None)
 Execute the currently configured fit on the measurement data. More...
 
def set_fit_domain (self, domain=None)
 Set the fit domain to a user specified portion of the data. More...
 

Public Attributes

 threadlock
 
 spectrum_fit
 
 fit_domain
 
 diff_spec_data_mod_on
 
 diff_spec_data_mod_off
 
 repetition_count
 

Static Public Attributes

 spectrometer = Connector(interface='SpectrometerInterface')
 
 odmrlogic = Connector(interface='ODMRLogic')
 
 savelogic = Connector(interface='SaveLogic')
 
 fitlogic = Connector(interface='FitLogic')
 
 fc = StatusVar('fits', None)
 
 sig_specdata_updated = QtCore.Signal()
 
 sig_next_diff_loop = QtCore.Signal()
 
 spectrum_fit_updated_Signal = QtCore.Signal(np.ndarray, dict, str)
 
 fit_domain_updated_Signal = QtCore.Signal(np.ndarray)
 

Detailed Description

This logic module gathers data from the spectrometer.

Constructor & Destructor Documentation

◆ __init__()

def spectrum.SpectrumLogic.__init__ (   self,
  kwargs 
)

Create SpectrometerLogic object with connectors.

Parameters
dictkwargs: optional parameters

Member Function Documentation

◆ do_fit()

def spectrum.SpectrumLogic.do_fit (   self,
  fit_function = None,
  x_data = None,
  y_data = None 
)

Execute the currently configured fit on the measurement data.

Optionally on passed data

   @param string fit_function: The name of one of the defined fit functions.

   @param array x_data: wavelength data for spectrum.

   @param array y_data: intensity data for spectrum.

◆ draw_figure()

def spectrum.SpectrumLogic.draw_figure (   self)

Draw the summary plot to save with the data.

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

◆ get_fit_functions()

def spectrum.SpectrumLogic.get_fit_functions (   self)

Fitting things.

Return the hardware constraints/limits

Returns
list(str): list of fit function names

◆ save_spectrum_data()

def spectrum.SpectrumLogic.save_spectrum_data (   self,
  background = False,
  name_tag = '',
  custom_header = None 
)

Saves the current spectrum data to a file.

Parameters
boolbackground: Whether this is a background spectrum (dark field) or not.
stringname_tag: postfix name tag for saved filename.
OrderedDictcustom_header: This ordered dictionary is added to the default data file header. It allows arbitrary additional experimental information to be included in the saved data file header.

◆ set_fit_domain()

def spectrum.SpectrumLogic.set_fit_domain (   self,
  domain = None 
)

Set the fit domain to a user specified portion of the data.

If no domain is given, then this method sets the fit domain to match the full data domain.

Parameters
np.arraydomain: two-element array containing min and max of domain.

◆ start_differential_spectrum()

def spectrum.SpectrumLogic.start_differential_spectrum (   self)

Start a differential spectrum acquisition.

An initial spectrum is recorded to initialise the data arrays to the right size.


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