satlas2.models package#

Submodules#

satlas2.models.hfsModel module#

Inheritance diagram of satlas2.models.hfsModel

Implementation of the HFSModel class, currently only supplied with a Voigt profile.

class satlas2.models.hfsModel.HFS(I: float, J: ArrayLike, A: ArrayLike = [0, 0], B: ArrayLike = [0, 0], C: ArrayLike = [0, 0], df: float = 0, fwhmg: float = 50, fwhml: float = 50, name: str = 'HFS', N: int = None, offset: float = 0, poisson: float = 0, scale: float = 1.0, racah: bool = True, prefunc: callable = None)[source]#

Bases: Model

Initializes a hyperfine spectrum Model with the given hyperfine parameters.

Parameters
  • I (float) – Integer or half-integer value of the nuclear spin

  • J (ArrayLike) – A sequence of 2 spins, respectively the J value of the lower state and the J value of the higher state

  • A (ArrayLike, optional) – A sequence of 2 A values, respectively for the lower and the higher state, by default [0, 0]

  • B (ArrayLike, optional) – A sequence of 2 B values, respectively for the lower and the higher state, by default [0, 0]

  • C (ArrayLike, optional) – A sequence of 2 C values, respectively for the lower and the higher state, by default [0, 0]

  • df (float, optional) – The centroid of the spectrum, by default 0

  • fwhmg (float, optional) – The Gaussian FWHM of the Voigt profile, by default 50

  • fwhml (float, optional) – The Lorentzian FWHM of the Voigt profile, by default 50

  • name (str, optional) – Name of the model, by default ‘HFS’

  • N (int, optional) – Number of sidepeaks to be generated, by default None

  • offset (float, optional) – Offset in units of x for the sidepeak, by default 0

  • poisson (float, optional) – The poisson factor for the sidepeaks, by default 0

  • scale (float, optional) – The amplitude of the entire spectrum, by default 1.0

  • racah (bool, optional) – Use individual amplitudes are setting the Racah intensities, by default True

  • prefunc (callable, optional) – Transformation to be applied on the input before evaluation, by default None

calcShift(I: float, J: float, F: int) ArrayLike[source]#

Calculate the coefficients for the energy shift due to the hyperfine interaction up to the octupole moment. A general equation is used so extending to higher orders is possible.

Parameters
  • I (float) – Nuclear spin

  • J (float) – Electronic spin

  • F (int) – Hyperfine level spin

Returns

Individual coefficients, in ascending order

Return type

ArrayLike

calculateFWHM() Tuple[float, float][source]#

Calculate the total FWHM of the profiles, with uncertainty, taking the correlations into account.

Returns

Tuple of the form (value, uncertainty)

Return type

Tuple[float, float]

fShifted(x: ArrayLike) ArrayLike[source]#

Calculate the response with N sidepeaks with an offset of offset

Parameters

x (ArrayLike) –

Return type

ArrayLike

fUnshifted(x: ArrayLike) ArrayLike[source]#

Calculate the response for an unshifted spectrum

Parameters

x (ArrayLike) –

Return type

ArrayLike

peak(x: ArrayLike, FWHMG: float, FWHML: float) ArrayLike[source]#

Calculates the Voigt profile given the Gaussian and Lorentzian FWHM

Parameters
  • x (ArrayLike) – Evaluation points

  • FWHMG (float) – Gaussian FWHM

  • FWHML (float) – Lorentzian FWHM

Return type

ArrayLike

pos() ArrayLike[source]#

Returns the positions of the peaks in MHz in the hyperfine spectrum

Return type

ArrayLike

satlas2.models.models module#

Inheritance diagram of satlas2.models.models

Implementation of the various common Models.

class satlas2.models.models.ExponentialDecay(a: float, tau: float, name: str = 'ExponentialDecay', prefunc: callable = None)[source]#

Bases: Model

Model for an exponential decay

Parameters
  • a (float) – Amplitude of the exponential

  • tau (float) – Half-life of the exponential

  • name (str, optional) – Name of the model, by default ‘ExponentialDecay’

  • prefunc (callable, optional) – Transform function for the input, by default None

class satlas2.models.models.Polynomial(p: ArrayLike, name: str = 'Polynomial', prefunc: callable = None)[source]#

Bases: Model

Model class for a polynomial response

Parameters
  • p (ArrayLike) – Polynomial coefficients, sorted in increasing order

  • name (str) – Name of the model

  • prefunc (callable, optional) – Transform function for the input, by default None

class satlas2.models.models.SkewedVoigt(A: float, mu: float, FWHMG: float, FWHML: float, skew: float, name: str = 'SkewedVoigt', prefunc: callable = None)[source]#

Bases: Voigt

Model for a Voigt peak skewed by the error function.

Parameters
  • A (float) – Amplitude of the peak

  • mu (float) – Position of the peak

  • FWHMG (float) – Gaussian FWHM

  • FWHML (float) – Lorentzian FWHM

  • skew (float) – Skew of the peak

  • name (str, optional) – Name of the model, by default ‘SkewedVoigt’

  • prefunc (callable, optional) – Transform of the input, by default None

class satlas2.models.models.Step(values: ArrayLike, bounds: ArrayLike, name: str = 'Step', prefunc: callable = None)[source]#

Bases: Model

Model class for a Step response

Parameters
  • values (ArrayLike) – Background values between bounds, starting at -inf

  • bounds (ArrayLike) – Bounds for background values

  • name (str, optional) – Name of the model

  • prefunc (callable, optional) – Transform function for the input, by default None

class satlas2.models.models.Voigt(A: float, mu: float, FWHMG: float, FWHML: float, name: str = 'Voigt', prefunc: callable = None)[source]#

Bases: Model

Model for a Voigt lineshape

Parameters
  • A (float) – Amplitude of the profile

  • mu (float) – Position of the peak

  • FWHMG (float) – Gaussian FWHM of the peak

  • FWHML (float) – Lorentzian FWHM of the peak

  • name (str, optional) – Name of the model, by default ‘Voigt’

  • prefunc (callable, optional) – Transform function of the input, by default None

calculateFWHM() Tuple[float, float][source]#

Calculate the total FWHM of the profiles, with uncertainty, taking the correlations into account.

Returns

Tuple of the form (value, uncertainty)

Return type

Tuple[float, float]

Module contents#