skrf.qfactor.Qfactor

class skrf.qfactor.Qfactor(ntwk, res_type, Q_L0=None, f_L0=None, verbose=False)[source]

Q-factor calculation class.

This class implements methods for determining loaded and unloaded Q-factor from frequency-domain S-parameters, that can be applied to measurements of transmission or reflection.

Parameters:
  • ntwk (Network object) – A 1-port scikit-rf Network. If your device is a N-port, pass the desired sub-S-parameters to fit the data from, like ntwk.s21.

  • res_type (str) – Specifies the resonance type: ‘reflection’, ‘transmission’, ‘reflection_method2’ or ‘absorption’: ‘reflection’ is generally suited for undercoupled resonators, while ‘reflection_method2’ is favoured for coupling with large loop.

  • Q_L0 (float, optional. Default is None.) – Estimated loaded Q-factor, used to improve fitting.

  • f_L0 (float, optional. Default is None.) – Estimated loaded resonant frequency, used to improve fitting [Hz] If None, automatically search for the min or max, depending on the resonance type defined by res_type.

  • verbose (bool, optional. Default is False.) – Boolean flag controlling output of information to the console.

Raises:

ValueError – If the passed Network is not 1-port or if the resonance type is unknown.

Notes

Uncalibrated line should be de-embedded (if it has significant length) from the S-parameter data before calling the functions in this module to get best results.

Attributes

BW

3-dB Bandwidth.

BW_scaled

3-dB Bandwidth scaled to the frequency unit.

f_L_scaled

Resonant Frequency in the frequency unit..

Methods

Q_circle

Q-circle diameter.

Q_unloaded

Unloaded Q-factor Q0.

__init__

Q-factor initializer.

angular_weights

Diagonal elements W_i of weights matrix.

fit

Fit Q-factor from S-parameter data.

fitted_network

Fitted Network.

fitted_s

S-parameter response of an equivalent circuit model resonator.