SpectralShapeSkewedGaussian¶
- class glotaran.builtin.models.spectral.shape.SpectralShapeSkewedGaussian[source]¶
Bases:
object
A (skewed) Gaussian spectral shape
Attributes Summary
Methods Summary
Calculate a (skewed) Gaussian shape for a given
axis
.Calculate a normal Gaussian shape for a given
axis
.Calculate the skewed Gaussian shape for
axis
.Returns a copy of the {cls._name} instance with all members which are Parameters are replaced by the value of the corresponding parameter in the parameter group.
Methods Documentation
- property amplitude: glotaran.parameter.parameter.Parameter¶
- calculate(axis: numpy.ndarray) numpy.ndarray [source]¶
Calculate a (skewed) Gaussian shape for a given
axis
.If a non-zero
skewness
parameter was addedcalculate_skewed_gaussian()
will be used. Otherwise it will usecalculate_gaussian()
.- Parameters
axis (np.ndarray) – The axis to calculate the shape for.
- Returns
shape – A Gaussian shape.
- Return type
See also
Note
Internally
axis
is converted from to , thuslocation
andwidth
also need to be provided in (1e7/value_in_nm
).
- calculate_gaussian(axis: numpy.ndarray) numpy.ndarray [source]¶
Calculate a normal Gaussian shape for a given
axis
.The following equation is used for the calculation:
The parameters of the equation represent the following attributes of the shape:
:
axis
:
amplitude
:
location
:
width
In this formalism, represents the full width at half maximum (FWHM). Compared to the more common definition we have
- Parameters
axis (np.ndarray) – The axis to calculate the shape for.
- Returns
An array representing a Gaussian shape.
- Return type
np.ndarray
- calculate_skewed_gaussian(axis: numpy.ndarray) numpy.ndarray [source]¶
Calculate the skewed Gaussian shape for
axis
.The following equation is used for the calculation:
With:
The parameters of the equation represent the following attributes of the shape:
:
axis
:
amplitude
:
location
:
width
:
skewness
Where represents the full width at half maximum (FWHM), see
calculate_gaussian()
.Note that in the limit of skewness parameter equal to zero simplifies to a normal gaussian (since ), see the definition in
calculate_gaussian()
.- Parameters
axis (np.ndarray) – The axis to calculate the shape for.
- Returns
An array representing a skewed Gaussian shape.
- Return type
np.ndarray
- fill(model: Model, parameters: ParameterGroup) cls ¶
Returns a copy of the {cls._name} instance with all members which are Parameters are replaced by the value of the corresponding parameter in the parameter group.
- Parameters
model – A glotaran model.
parameter (ParameterGroup) – The parameter group to fill from.
- property label: str¶
- property location: glotaran.parameter.parameter.Parameter¶
- property skewness: glotaran.parameter.parameter.Parameter¶
- property type: str¶
- property width: glotaran.parameter.parameter.Parameter¶