Fitting an RTS histogram and extracting the tunnel rates

The core function for this example is tunnelrates_RTS from qtt.algorithms.random_telegraph_signal. The function takes a time-resolved dataset with a random telegraph signal and fits the histogram of signal values to a double-gaussian function, from which the SNR based visibility of the signal can be obtained. It then searches dataset for the RTS transitions (up and down) and from the histograms of transitions, calculates the tunnel rates for both transitions.

[1]:
import os
import qcodes
from qcodes.data.data_set import DataSet
import qtt

%matplotlib inline
import numpy as np
from qtt.algorithms.random_telegraph_signal import tunnelrates_RTS

Load a sample dataset with a time-resolved trace with RTS:

[2]:
exampledatadir=os.path.join(qtt.__path__[0], 'exampledata')
DataSet.default_io = qcodes.data.io.DiskIO(exampledatadir)
dataset = qtt.data.load_dataset('rts_signal')

rtsdata = dataset.measured.ndarray
samplerate = 1 / (dataset.time[1] - dataset.time[0])

Run the core function and obtain the tunnel rates:

[3]:
tunnelrates_RTS(rtsdata, samplerate=samplerate, min_sep = 1.0, min_duration = 20, num_bins = 40, fig=1, verbose=1)
Fit parameters double gaussian:
 mean down: -0.130 counts, mean up: -0.097 counts, std down: 0.010 counts, std up:0.010 counts
Separation between peaks gaussians: 1.653 std
Split between two levels: -0.114
Tunnel rate down to up: 94.3 kHz
Tunnel rate up to down: 72.1 kHz
[3]:
(94.25667715824251,
 72.09803029068505,
 {'sampling rate': 7812630.000000018,
  'fit parameters double gaussian': array([ 7.02695960e+04,  2.24117976e+04,  9.90102748e-03,  1.03982288e-02,
         -1.30233303e-01, -9.66862750e-02]),
  'separations between peaks gaussians': 1.6526234967095543,
  'split between the two levels': -0.1138706321452195,
  'down_segments': {'mean': 9.850112516891924e-06,
   'p50': 5.759904155194844e-06,
   'mean_filtered': 76.95528455284553},
  'up_segments': {'mean': 3.696660340979315e-06,
   'p50': 7.67987220692646e-07,
   'mean_filtered': 28.88063947974529},
  'tunnelrate_down_to_up': 101521.68295388539,
  'tunnelrate_up_to_down': 270514.4394562042,
  'fraction_down': 0.7271498494746974,
  'fraction_up': 0.2728501505253026,
  'fit parameters exp. decay down': [1.9993002376362625,
   1406.8284745097944,
   94256.67715824251],
  'fit parameters exp. decay up': [1.4958935334632635,
   357.8806097674549,
   72098.03029068504],
  'tunnelrate_down_exponential_fit': 94.25667715824251,
  'tunnelrate_up_exponential_fit': 72.09803029068505})
../../_images/notebooks_analysis_example_doublegauss_expdecay_rts_6_2.png
../../_images/notebooks_analysis_example_doublegauss_expdecay_rts_6_3.png
../../_images/notebooks_analysis_example_doublegauss_expdecay_rts_6_4.png
../../_images/notebooks_analysis_example_doublegauss_expdecay_rts_6_5.png
[ ]: