ml-peak-shape-generator
    Preparing search index...

    Class SplitGaussian

    Implements

    Index

    Constructors

    Properties

    fwhmHigh: number

    Full width at half maximum of the higher-x half (x > 0).

    500
    
    fwhmLow: number

    Full width at half maximum of the lower-x half (x <= 0).

    500
    

    Accessors

    • get fwhm(): number

      Full width at half maximum of the peak. The half-maximum crossings are at -fwhmLow / 2 and fwhmHigh / 2, so the width between them is the mean of both halves.

      Returns number

      the full width at half maximum.

    • set fwhm(value: number): void

      Set the full width at half maximum. Both halves are scaled by the same ratio, so their mean becomes value while the asymmetry between them is preserved. A peak with no width has no ratio to preserve, so both halves take value and the peak stays symmetric.

      Parameters

      • value: number

        the new full width at half maximum.

      Returns void

    Methods

    • Analytical partial derivatives of fct at x, with respect to x and to each shape parameter (in the same order as getParameters()). Every shape provides a closed-form Jacobian, so consumers (e.g. curve fitting) can use it directly instead of numerical differentiation.

      Parameters

      • x: number

        position at which to evaluate the derivatives.

      Returns Shape1DDerivative

    • Return a parameterized function of a gaussian shape (see README for equation).

      Parameters

      • x: number

      Returns number

      • the y value of gaussian with the current parameters.
    • Convert a full width at half maximum to the width between the inflection points. For this peak's own fwhm the result is exactly σlow + σhigh.

      Parameters

      • fwhm: number = ...

        full width at half maximum. Defaults to the peak's fwhm.

      Returns number

      the width between the inflection points.

    • Calculate intensity array of a gaussian shape.

      Parameters

      • options: GetData1DOptions = {}

      Returns Float64Array<ArrayBuffer>

      Intensity values.

    • Convert a width between the inflection points back to a full width at half maximum. A single width does not encode the asymmetry, so it cannot recover fwhmLow and fwhmHigh individually.

      Parameters

      • width: number

        width between the inflection points.

      Returns number

      the corresponding full width at half maximum.