SpectralShapeGaussian

class glotaran.builtin.megacomplexes.spectral.shape.SpectralShapeGaussian[source]

Bases: object

A Gaussian spectral shape

Attributes Summary

amplitude

ModelProperty is an extension of the property decorator.

label

ModelProperty is an extension of the property decorator.

location

ModelProperty is an extension of the property decorator.

type

ModelProperty is an extension of the property decorator.

width

ModelProperty is an extension of the property decorator.

Methods Summary

as_dict

calculate

Calculate a normal Gaussian shape for a given axis.

fill

from_dict

markdown

validate

Methods Documentation

property amplitude: model_property.glotaran_property_type

ModelProperty is an extension of the property decorator.

It adds convenience functions for meta programming model items.

as_dict() dict
calculate(axis: numpy.ndarray) numpy.ndarray[source]

Calculate a normal Gaussian shape for a given axis.

The following equation is used for the calculation:

f(x, A, x_0, \Delta) = A \exp \left({-
\frac{
    \log{\left(2 \right)
    \left(2(x - x_{0})\right)^{2}
}}{\Delta^{2}}}\right)

The parameters of the equation represent the following attributes of the shape:

  • x : axis

  • A : amplitude

  • x_0 : location

  • \Delta : width

In this formalism, \Delta represents the full width at half maximum (FWHM). Compared to the more common definition \exp \left(- (x-\mu )^{2}/(2\sigma^{2})\right) we have \sigma = \Delta/(2\sqrt{2\ln(2)})=\Delta/2.35482

Parameters

axis (np.ndarray) – The axis to calculate the shape for.

Returns

An array representing a Gaussian shape.

Return type

np.ndarray

fill(model: Model, parameters: ParameterGroup) cls
classmethod from_dict(values: dict) cls
property label: model_property.glotaran_property_type

ModelProperty is an extension of the property decorator.

It adds convenience functions for meta programming model items.

property location: model_property.glotaran_property_type

ModelProperty is an extension of the property decorator.

It adds convenience functions for meta programming model items.

markdown(all_parameters: ParameterGroup = None, initial_parameters: ParameterGroup = None) MarkdownStr
property type: model_property.glotaran_property_type

ModelProperty is an extension of the property decorator.

It adds convenience functions for meta programming model items.

validate(model: Model, parameters: ParameterGroup | None = None) list[str]
property width: model_property.glotaran_property_type

ModelProperty is an extension of the property decorator.

It adds convenience functions for meta programming model items.