Qudi
Public Member Functions | List of all members
basic_extraction_methods.BasicPulseExtractor Class Reference
Inheritance diagram for basic_extraction_methods.BasicPulseExtractor:
Inheritance graph
[legend]
Collaboration diagram for basic_extraction_methods.BasicPulseExtractor:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, args, kwargs)
 
def gated_conv_deriv (self, count_data, conv_std_dev=20.0)
 
def ungated_conv_deriv (self, count_data, conv_std_dev=20.0)
 Detects the laser pulses in the ungated timetrace data and extracts them. More...
 
def ungated_threshold (self, count_data, count_threshold=10, min_laser_length=200e-9, threshold_tolerance=20e-9)
 
def ungated_gated_conv_deriv (self, count_data, conv_std_dev=20.0, delay=5e-7, safety=2e-7)
 Extracts the laser pulses in the ungated timetrace data using laser_start_indices and laser_length. More...
 

Member Function Documentation

◆ ungated_conv_deriv()

def basic_extraction_methods.BasicPulseExtractor.ungated_conv_deriv (   self,
  count_data,
  conv_std_dev = 20.0 
)

Detects the laser pulses in the ungated timetrace data and extracts them.

Parameters
numpy.ndarraycount_data: 1D array the raw timetrace data from an ungated fast counter
dictmeasurement_settings: The measurement settings of the currently running measurement.
floatconv_std_dev: The standard deviation of the gaussian used for smoothing
Returns
2D numpy.ndarray: 2D array, the extracted laser pulses of the timetrace. dimensions 0: laser number, 1: time bin
Procedure

Edge Detection

The count_data array with the laser pulses is smoothed with a gaussian filter (convolution), which used a defined standard deviation of 10 entries (bins). Then the derivation of the convolved time trace is taken to obtain the maxima and minima, which corresponds to the rising and falling edge of the pulses.

The convolution with a gaussian removes nasty peaks due to count fluctuation within a laser pulse and at the same time ensures a clear distinction of the maxima and minima in the derived convolved trace.

The maxima and minima are not found sequentially, pulse by pulse, but are rather globally obtained. I.e. the convolved and derived array is searched iteratively for a maximum and a minimum, and after finding those the array entries within the 4 times self.conv_std_dev (2*self.conv_std_dev to the left and 2*self.conv_std_dev) are set to zero.

The crucial part is the knowledge of the number of laser pulses and the choice of the appropriate std_dev for the gauss filter.

To ensure a good performance of the edge detection, you have to ensure a steep rising and falling edge of the laser pulse! Be also careful in choosing a large conv_std_dev value and using a small laser pulse (rule of thumb: conv_std_dev < laser_length/10).

◆ ungated_gated_conv_deriv()

def basic_extraction_methods.BasicPulseExtractor.ungated_gated_conv_deriv (   self,
  count_data,
  conv_std_dev = 20.0,
  delay = 5e-7,
  safety = 2e-7 
)

Extracts the laser pulses in the ungated timetrace data using laser_start_indices and laser_length.

Parameters
numpy.ndarraycount_data: 1D array the raw timetrace data from an ungated fast counter
Returns
2D numpy.ndarray: 2D array, the extracted laser pulses of the timetrace. dimensions 0: laser number, 1: time bin
Procedure

Threshold detection:

Finds the laser pulses from the ungated timetrace using that their positions are known. The laser pulses are the extracted using gated_conv_deriv.

◆ ungated_threshold()

def basic_extraction_methods.BasicPulseExtractor.ungated_threshold (   self,
  count_data,
  count_threshold = 10,
  min_laser_length = 200e-9,
  threshold_tolerance = 20e-9 
)
Parameters
count_data
    @return:
Detects the laser pulses in the ungated timetrace data and extracts them.

@param numpy.ndarray count_data: 1D array the raw timetrace data from an ungated fast counter
@param measurement_settings:
@param fast_counter_settings:
@param count_threshold:
@param min_laser_length:
@param threshold_tolerance:

@return 2D numpy.ndarray:   2D array, the extracted laser pulses of the timetrace.
                    dimensions: 0: laser number, 1: time bin

Procedure:
    Threshold detection:
    ---------------

    All count data from the time trace is compared to a threshold value.
    Values above the threshold are considered to belong to a laser pulse.
    If the length of a pulse would be below the minimum length the pulse is discarded.
    If a number of bins which are below the threshold is smaller than the number of bins making the
    threshold_tolerance then they are still considered to belong to a laser pulse.

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