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.
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
sggtwice 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
sggrepeatedly. Ask for more than two by calling this andsgg.