<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 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).<br>
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.<br>
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)
Step1:  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.
Step2:  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.<br>
The circle fit algorithm takes the resonator type into account by chosing either reflection = True or notch = True (default).<br>
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.
<ASSISTANT_TASK:>
Python Code:
## 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
Explanation: 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).<br>
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.<br>
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)
End of explanation
r = Resonator(qkit.fid.measure_db['XXXXXX'])
Explanation: 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.
End of explanation
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
Explanation: 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.<br>
The circle fit algorithm takes the resonator type into account by chosing either reflection = True or notch = True (default).<br>
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.
End of explanation
<END_TASK>