ml-spectra-fitting
    Preparing search index...

    Function optimize

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

      Type Parameters

      Parameters

      • data: DataXY

        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.