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

    Interface Shape1DClass

    interface Shape1DClass {
        fwhm: number;
        kind:
            | "gaussian"
            | "lorentzian"
            | "pseudoVoigt"
            | "lorentzianDispersive"
            | "generalizedLorentzian"
            | "pseudoVoigtTCH"
            | "splitGaussian";
        calculateHeight(area?: number): number;
        derivative(x: number): Shape1DDerivative;
        fct(x: number): number;
        fwhmToWidth(fwhm?: number): number;
        getArea(height?: number): number;
        getData(options?: GetData1DOptions): DoubleArray;
        getFactor(area?: number): number;
        getParameters(): (
            "fwhm"
            | "gamma"
            | "mu"
            | "fwhmG"
            | "fwhmL"
            | "fwhmLow"
            | "fwhmHigh"
        )[];
        toJSON(): Shape1D;
        widthToFWHM(width: number): number;
    }

    Implemented by

    Index

    Properties

    fwhm: number
    kind:
        | "gaussian"
        | "lorentzian"
        | "pseudoVoigt"
        | "lorentzianDispersive"
        | "generalizedLorentzian"
        | "pseudoVoigtTCH"
        | "splitGaussian"

    Kind of shape, so that an instance is also a valid Shape1D descriptor.

    Methods

    • Calculate the height depending of fwhm and area.

      Parameters

      • Optionalarea: number

      Returns number

    • 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.
    • Compute the value of width between the inflection points from Full Width at Half Maximum (FWHM). for more information check the mathworld page

      Parameters

      • Optionalfwhm: number

        Full Width at Half Maximum.

      Returns number

      width

    • Calculate the area of a specific shape.

      Parameters

      • Optionalheight: number

      Returns number

      returns the area of the specific shape and parameters.

    • Calculate intensity array of a gaussian shape.

      Parameters

      • Optionaloptions: GetData1DOptions

      Returns DoubleArray

      Intensity values.

    • Calculate the number of times FWHM allows to reach a specific area coverage.

      Parameters

      • Optionalarea: number

        Expected area to be covered.

      Returns number

    • Returns an array of the different parameters characterizing the shape

      Returns ("fwhm" | "gamma" | "mu" | "fwhmG" | "fwhmL" | "fwhmLow" | "fwhmHigh")[]

    • Compute the value of Full Width at Half Maximum (FWHM) from the width between the inflection points. for more information check the mathworld page

      Parameters

      • width: number

      Returns number

      fwhm