• Fits a set of points to the sum of a set of bell functions.

    Type Parameters

    Parameters

    • data: DataXY<NumberArray>

      An object containing the x and y data to be fitted.

    • peaks: T[]

      A list of initial parameters to be optimized. e.g. coming from a peak picking [{x, y, width}].

    • options: OptimizeOptions = {}

      Options for optimize

    Returns {
        error: number;
        iterations: number;
        peaks: OptimizedPeakIDOrNot<T>[];
    }

    • An object with fitting error and the list of optimized parameters { parameters: [ {x, y, width} ], error } if the kind of shape is pseudoVoigt mu parameter is optimized.
    • error: number
    • iterations: number
    • peaks: OptimizedPeakIDOrNot<T>[]