import type { GetData1DOptions } from '../GetData1DOptions.ts'; import type { Shape1DClass, Shape1DDerivative } from '../Shape1DClass.ts'; import type { SplitGaussianShape1D } from '../shape_1d.ts'; export interface SplitGaussianClassOptions { /** * Full width at half maximum of the lower-x half (x <= 0). * @default 500 */ fwhmLow?: number; /** * Full width at half maximum of the higher-x half (x > 0). * @default 500 */ fwhmHigh?: number; } interface CalculateSplitGaussianHeightOptions { /** * Full width at half maximum of the lower-x half. * @default 500 */ fwhmLow?: number; /** * Full width at half maximum of the higher-x half. * @default 500 */ fwhmHigh?: number; /** * @default 1 */ area?: number; } interface GetSplitGaussianAreaOptions { /** * The maximum intensity value of the shape. * @default 1 */ height?: number; /** * Full width at half maximum of the lower-x half. * @default 500 */ fwhmLow?: number; /** * Full width at half maximum of the higher-x half. * @default 500 */ fwhmHigh?: number; } export declare class SplitGaussian implements Shape1DClass { readonly kind: "splitGaussian"; /** * Full width at half maximum of the lower-x half (x <= 0). * @default 500 */ fwhmLow: number; /** * Full width at half maximum of the higher-x half (x > 0). * @default 500 */ fwhmHigh: number; constructor(options?: SplitGaussianClassOptions); /** * 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 the full width at half maximum. */ get fwhm(): number; /** * 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. * @param value - the new full width at half maximum. */ set fwhm(value: number); /** * 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`. * @param fwhm - full width at half maximum. Defaults to the peak's fwhm. * @returns the width between the inflection points. */ fwhmToWidth(fwhm?: number): number; /** * 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. * @param width - width between the inflection points. * @returns the corresponding full width at half maximum. */ widthToFWHM(width: number): number; fct(x: number): number; getArea(height?: number): number; getFactor(area?: number): number; getData(options?: GetData1DOptions): Float64Array; calculateHeight(area?: number): number; getParameters(): SplitGaussianParameter[]; /** * Descriptor of this shape, so `JSON.stringify` round-trips through `getShape1D`. * @returns the shape descriptor. */ toJSON(): SplitGaussianShape1D; derivative(x: number): Shape1DDerivative; } /** Parameters characterizing a split gaussian shape. */ export type SplitGaussianParameter = 'fwhmLow' | 'fwhmHigh'; /** * Calculate the peak height for a given area and both half-widths. * @param options - fwhmLow, fwhmHigh and area. * @returns the peak height. */ export declare function calculateSplitGaussianHeight(options: CalculateSplitGaussianHeightOptions): number; /** * Evaluate the split (asymmetric) gaussian function centered at x=0. * The lower-x half (x <= 0) uses `fwhmLow`, the higher-x half (x > 0) uses `fwhmHigh`. * @param x - position at which to evaluate. * @param fwhmLow - full width at half maximum of the lower-x half. * @param fwhmHigh - full width at half maximum of the higher-x half. * @returns the intensity at x. */ export declare function splitGaussianFct(x: number, fwhmLow: number, fwhmHigh: number): number; /** * Analytical value and partial derivatives of the split gaussian function centered at x=0. * Each half's fwhm only affects its own side, so the off-side derivative is 0. * @param x - position at which to evaluate. * @param fwhmLow - full width at half maximum of the lower-x half. * @param fwhmHigh - full width at half maximum of the higher-x half. * @returns the value `fct` and its partial derivatives with respect to `x` (`dx`), `fwhmLow` (`dFwhmLow`) and `fwhmHigh` (`dFwhmHigh`). */ export declare function splitGaussianDerivative(x: number, fwhmLow: number, fwhmHigh: number): { fct: number; dx: number; dFwhmLow: number; dFwhmHigh: number; }; /** * Calculate the area under a split gaussian peak. * @param options - fwhmLow, fwhmHigh and height. * @returns the area. */ export declare function getSplitGaussianArea(options: GetSplitGaussianAreaOptions): number; /** * Generate an intensity array for a split gaussian shape. * @param shape - split gaussian shape parameters (fwhmLow, fwhmHigh). * @param options - sampling options (length, factor, height). * @returns Float64Array of intensity values. */ export declare function getSplitGaussianData(shape?: SplitGaussianClassOptions, options?: GetData1DOptions): Float64Array; export {}; //# sourceMappingURL=SplitGaussian.d.ts.map