Qudi
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
odmr_logic.ODMRLogic Class Reference

This is the Logic class for ODMR. More...

Inheritance diagram for odmr_logic.ODMRLogic:
Inheritance graph
[legend]
Collaboration diagram for odmr_logic.ODMRLogic:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, config, kwargs)
 
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)
 
def sv_get_fits (self, val)
 save configured fits
 
def set_trigger (self, trigger_pol, frequency)
 Set trigger polarity of external microwave trigger (for list and sweep mode). More...
 
def set_average_length (self, lines_to_average)
 Sets the number of lines to average for the sum of the data. More...
 
def set_clock_frequency (self, clock_frequency)
 Sets the frequency of the counter clock. More...
 
def set_matrix_line_number (self, number_of_lines)
 Sets the number of lines in the ODMR matrix. More...
 
def set_runtime (self, runtime)
 Sets the runtime for ODMR measurement. More...
 
def set_cw_parameters (self, frequency, power)
 Set the desired new cw mode parameters. More...
 
def set_sweep_parameters (self, start, stop, step, power)
 Set the desired frequency parameters for list and sweep mode. More...
 
def mw_cw_on (self)
 Switching on the mw source in cw mode. More...
 
def mw_sweep_on (self)
 Switching on the mw source in list/sweep mode. More...
 
def reset_sweep (self)
 Resets the list/sweep mode of the microwave source to the first frequency step.
 
def mw_off (self)
 Switching off the MW source. More...
 
def start_odmr_scan (self)
 Starting an ODMR scan. More...
 
def continue_odmr_scan (self)
 Continue ODMR scan. More...
 
def stop_odmr_scan (self)
 Stop the ODMR scan. More...
 
def clear_odmr_data (self)
 ¨Set the option to clear the curret ODMR data. More...
 
def get_odmr_channels (self)
 
def get_hw_constraints (self)
 Return the names of all ocnfigured fit functions. More...
 
def get_fit_functions (self)
 Return the hardware constraints/limits. More...
 
def do_fit (self, fit_function=None, x_data=None, y_data=None, channel_index=0)
 Execute the currently configured fit on the measurement data. More...
 
def save_odmr_data (self, tag=None, colorscale_range=None, percentile_range=None)
 Saves the current ODMR data to a file. More...
 
def draw_figure (self, channel_number, cbar_range=None, percentile_range=None)
 Draw the summary figure to save with the data. More...
 
def perform_odmr_measurement (self, freq_start, freq_step, freq_stop, power, runtime, fit_function='No Fit', save_after_meas=True, name_tag='')
 An independant method, which can be called by a task with the proper input values to perform an odmr measurement. More...
 

Public Attributes

 threadlock
 
 mw_trigger_pol
 
 elapsed_time
 
 elapsed_sweeps
 
 odmr_raw_data
 
 odmr_plot_x
 
 odmr_plot_y
 
 odmr_fit_x
 
 odmr_fit_y
 
 odmr_plot_xy
 
 stopRequested
 

Static Public Attributes

 odmrcounter = Connector(interface='ODMRCounterInterface')
 
 fitlogic = Connector(interface='FitLogic')
 
 microwave1 = Connector(interface='mwsourceinterface')
 
 savelogic = Connector(interface='SaveLogic')
 
 taskrunner = Connector(interface='TaskRunner')
 
 mw_scanmode
 
 clock_frequency = StatusVar('clock_frequency', 200)
 
 cw_mw_frequency = StatusVar('cw_mw_frequency', 2870e6)
 
 cw_mw_power = StatusVar('cw_mw_power', -30)
 
 sweep_mw_power = StatusVar('sweep_mw_power', -30)
 
 mw_start = StatusVar('mw_start', 2800e6)
 
 mw_stop = StatusVar('mw_stop', 2950e6)
 
 mw_step = StatusVar('mw_step', 2e6)
 
 run_time = StatusVar('run_time', 60)
 
 number_of_lines = StatusVar('number_of_lines', 50)
 
 fc = StatusVar('fits', None)
 
 lines_to_average = StatusVar('lines_to_average', 0)
 
 sigNextLine = QtCore.Signal()
 
 sigParameterUpdated = QtCore.Signal(dict)
 
 sigOutputStateUpdated = QtCore.Signal(str, bool)
 
 sigOdmrPlotsUpdated = QtCore.Signal(np.ndarray, np.ndarray, np.ndarray)
 
 sigOdmrFitUpdated = QtCore.Signal(np.ndarray, np.ndarray, dict, str)
 
 sigOdmrElapsedTimeUpdated = QtCore.Signal(float, int)
 

Detailed Description

This is the Logic class for ODMR.

Member Function Documentation

◆ clear_odmr_data()

def odmr_logic.ODMRLogic.clear_odmr_data (   self)

¨Set the option to clear the curret ODMR data.

The clear operation has to be performed within the method _scan_odmr_line. This method just sets the flag for that.

◆ continue_odmr_scan()

def odmr_logic.ODMRLogic.continue_odmr_scan (   self)

Continue ODMR scan.

Returns
int: error code (0:OK, -1:error)

◆ do_fit()

def odmr_logic.ODMRLogic.do_fit (   self,
  fit_function = None,
  x_data = None,
  y_data = None,
  channel_index = 0 
)

Execute the currently configured fit on the measurement data.

Optionally on passed data

◆ draw_figure()

def odmr_logic.ODMRLogic.draw_figure (   self,
  channel_number,
  cbar_range = None,
  percentile_range = None 
)

Draw the summary figure to save with the data.

Parameters

◆ get_fit_functions()

def odmr_logic.ODMRLogic.get_fit_functions (   self)

Return the hardware constraints/limits.

Returns
list(str): list of fit function names

◆ get_hw_constraints()

def odmr_logic.ODMRLogic.get_hw_constraints (   self)

Return the names of all ocnfigured fit functions.

Returns
object: Hardware constraints object

◆ mw_cw_on()

def odmr_logic.ODMRLogic.mw_cw_on (   self)

Switching on the mw source in cw mode.

Returns
str, bool: active mode ['cw', 'list', 'sweep'], is_running

◆ mw_off()

def odmr_logic.ODMRLogic.mw_off (   self)

Switching off the MW source.

Returns
str, bool: active mode ['cw', 'list', 'sweep'], is_running

◆ mw_sweep_on()

def odmr_logic.ODMRLogic.mw_sweep_on (   self)

Switching on the mw source in list/sweep mode.

Returns
str, bool: active mode ['cw', 'list', 'sweep'], is_running

◆ perform_odmr_measurement()

def odmr_logic.ODMRLogic.perform_odmr_measurement (   self,
  freq_start,
  freq_step,
  freq_stop,
  power,
  runtime,
  fit_function = 'No Fit',
  save_after_meas = True,
  name_tag = '' 
)

An independant method, which can be called by a task with the proper input values to perform an odmr measurement.

Returns

◆ save_odmr_data()

def odmr_logic.ODMRLogic.save_odmr_data (   self,
  tag = None,
  colorscale_range = None,
  percentile_range = None 
)

Saves the current ODMR data to a file.

◆ set_average_length()

def odmr_logic.ODMRLogic.set_average_length (   self,
  lines_to_average 
)

Sets the number of lines to average for the sum of the data.

Parameters
intlines_to_average: desired number of lines to average (0 means all)
Returns
int: actually set lines to average

◆ set_clock_frequency()

def odmr_logic.ODMRLogic.set_clock_frequency (   self,
  clock_frequency 
)

Sets the frequency of the counter clock.

Parameters
intclock_frequency: desired frequency of the clock
Returns
int: actually set clock frequency

◆ set_cw_parameters()

def odmr_logic.ODMRLogic.set_cw_parameters (   self,
  frequency,
  power 
)

Set the desired new cw mode parameters.

Parameters
floatfrequency: frequency to set in Hz
floatpower: power to set in dBm
Returns
(float, float): actually set frequency in Hz, actually set power in dBm

◆ set_matrix_line_number()

def odmr_logic.ODMRLogic.set_matrix_line_number (   self,
  number_of_lines 
)

Sets the number of lines in the ODMR matrix.

Parameters
intnumber_of_lines: desired number of matrix lines
Returns
int: actually set number of matrix lines

◆ set_runtime()

def odmr_logic.ODMRLogic.set_runtime (   self,
  runtime 
)

Sets the runtime for ODMR measurement.

Parameters
floatruntime: desired runtime in seconds
Returns
float: actually set runtime in seconds

◆ set_sweep_parameters()

def odmr_logic.ODMRLogic.set_sweep_parameters (   self,
  start,
  stop,
  step,
  power 
)

Set the desired frequency parameters for list and sweep mode.

Parameters
floatstart: start frequency to set in Hz
floatstop: stop frequency to set in Hz
floatstep: step frequency to set in Hz
floatpower: mw power to set in dBm
Returns
float, float, float, float: current start_freq, current stop_freq, current freq_step, current power

◆ set_trigger()

def odmr_logic.ODMRLogic.set_trigger (   self,
  trigger_pol,
  frequency 
)

Set trigger polarity of external microwave trigger (for list and sweep mode).

Parameters
objecttrigger_pol: one of [TriggerEdge.RISING, TriggerEdge.FALLING]
floatfrequency: trigger frequency during ODMR scan
Returns
object: actually set trigger polarity returned from hardware

◆ start_odmr_scan()

def odmr_logic.ODMRLogic.start_odmr_scan (   self)

Starting an ODMR scan.

Returns
int: error code (0:OK, -1:error)

◆ stop_odmr_scan()

def odmr_logic.ODMRLogic.stop_odmr_scan (   self)

Stop the ODMR scan.

Returns
int: error code (0:OK, -1:error)

Member Data Documentation

◆ mw_scanmode

odmr_logic.ODMRLogic.mw_scanmode
static
Initial value:
= ConfigOption(
'scanmode',
'LIST',
missing='warn',
converter=lambda x: MicrowaveMode[x.upper()])

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