autodeer.ResPro

Module Contents

Classes

ResonatorProfileAnalysis

Analysis and calculation of resonator profiles.

Functions

ceil(number[, decimals])

floor(number[, decimals])

calc_overlap(x, func1, func2)

Calcuates the overlap between two functions.

BSpline_extra(tck_s)

optimise_spectra_position(resonator_profile, fieldsweep)

class autodeer.ResPro.ResonatorProfileAnalysis(dataset, f_lims=(32, 36))[source]

Analysis and calculation of resonator profiles.

Parameters:
datasetxr.xarray

The dataset containing the nutations. It must have both a ‘LO’ axis and a ‘pulse0_tp’ axis.

f_limstuple, optional

The frequency limits of the resonator profile, by default (33,35)

dataset[source]
n_files[source]
t[source]
f_lims[source]
process_nutations(noisedensity=None, threshold=2, nfft=1000)[source]

Uses a power series to extract the resonator profile.

Parameters:
noisedensitytuple, optional

If not given the first trace is assumed to be so far off resonance that it is just noise.

nfft: int, optional

The length of the fft to be used, zero padded if requred, default is 1000.

threshold: int, optional

The multiples above the noise a single must be to not be excluded, default is 2.

Returns:
prof_data: np.ndarray

The resonator profile, give in nutation frequency (GHz)

prof_frqs: np.ndarray

The frequency axis in GHz

Parameters:
  • noisedensity (float)

  • threshold (int)

  • nfft (int)

_process_fit(R_limit=0.5)[source]
fit(f_diff_threshold=2, cores=1, multi_mode=False, fc_guess=None)[source]

Fit the resonator profile with a sum of lorentzians.

Parameters:
f_diff_thresholdfloat, optional

The difference between two peaks at which they will be merged into one, by default 0.03

plot(fieldsweep=None, axs=None, fig=None)[source]

plot.

Parameters:
fieldsweepFieldSweepAnalysis, optional

Overlays the FieldSweep if provided, by default None

axsmatplotlib.Axes, optional

Axes to plot on, by default None

figmatplotlib.Figure, optional

Figure to plot on, by default None

Returns:
Matplotlib.Figure

matplotlib figure object

autodeer.ResPro.ceil(number, decimals=0)[source]
autodeer.ResPro.floor(number, decimals=0)[source]
autodeer.ResPro.calc_overlap(x, func1, func2)[source]

Calcuates the overlap between two functions.

Parameters:
xnp.ndarray

The x axis of the functions

func1function

The first function

func2function

The second function

Returns:
float

The overlap between the two functions.

autodeer.ResPro.BSpline_extra(tck_s)[source]
autodeer.ResPro.optimise_spectra_position(resonator_profile, fieldsweep, verbosity=0)[source]