/** * Two derivatives of one spectrum, in a single pass. */ import type { NumberArray } from 'cheminfo-types'; export interface SGGPairOptions { /** * @default 9 */ windowSize?: number; /** * The two derivative orders, in the order they are returned. * @default [1, 2] */ derivatives?: [number, number]; /** * @default 3 */ polynomial?: number; } /** * Apply the Savitzky Golay algorithm for two derivative orders at once. * * Each y value is read once and multiplied into both accumulators, and the * window spacing is measured once and raised twice, where calling `sgg` twice * repeats both. Peak picking wants the first and second derivative of the same * trace, which is what the default asks for. * * Two and not a list: an accumulator per order behind a loop costs more than * sharing the reads saves, so a general version measured slower than calling * `sgg` repeatedly. Ask for more than two by calling this and `sgg`. * @param ys - Array of y values. * @param xs - Array of X or deltaX. * @param options - Options controlling window size, derivatives and polynomial order. * @returns The two derivative arrays, in the order requested. */ export declare function sggPair(ys: NumberArray, xs: NumberArray | number, options?: SGGPairOptions): [Float64Array, Float64Array]; //# sourceMappingURL=sggPair.d.ts.map