Resonator class basics

The resonator class can be used to fit resonator measurements (or fit live during the measurement, see the spectroscopy example notebook for that).
The resonator class is able to fit the (squared) amplitude or complex scattering data to multiple fit models. Currently it is possible to fit the data to a Lorentzian curve, skewed Lorentzian curve, Fano resonance curve, and a circle fit.
All fit parameters are saved in the hdf5 file and comparison views between data and fit are created.

More information about the background to the fit models can be found i.e. in the papers by P. J. Petersan, J. Appl. Phys 84 (1998) and S. Probst, Rev. Sci. Instrum. 86 (2015)


In [ ]:
## start qkit and import the necessary classes; here we assume a already configured qkit environment 
import qkit
qkit.start()

from qkit.analysis.resonator import Resonator

A resonator object takes the path of the data file as an argument (mandatory). The path can be retrieved by using the file UUID and qkit's file information database.


In [ ]:
r = Resonator(qkit.fid.measure_db['XXXXXX'])

The fitting is done by calling one of the fit functions of the object. It is asumend, that the datasets for amplitude and phase are propperly named. Fitting all entries of a value matrix dataset requires an additional parameter fit_all = True. Fitting a value box is not yet possible.
The circle fit algorithm takes the resonator type into account by chosing either reflection = True or notch = True (default).
The frequency range of the fit can be set to only fit the data within that range. By default all frequency points contribute to the fit.


In [ ]:
r.fit_lorentzian(f_min = 5.0e9) ## set lower frequency boundary
r.fit_skewed_lorentzian(f_min = 5.2e9, f_max = 5.6e9) ## set frequency range
r.fit_fano(fit_all = True) ## fit all entries of a value matrix
r.fit_circle(reflection = True, fit_all = True) ## reflection resonator; fit all entries of a value matrix