basicmath: add option to do a linear regresion to extrapolate spectra data instead of constant extrapolation