% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spectra-preprocess.R
\name{.sg1}
\alias{.sg1}
\title{Savitzky-Golay 1st derivative}
\usage{
.sg1(X, w = 5L, p = 2L)
}
\description{
Delegates to \code{prospectr::savitzkyGolay} when available
(\code{m = 1}, polynomial \code{p}, window \code{w}). The native
fallback uses the closed-form 5-point coefficients
\code{(-2, -1, 0, 1, 2) / 10}, which is the SG solution for
\code{w = 5}, \code{p = 2}, \code{m = 1}, and trims two columns
from each edge. For \code{w != 5} the native path falls back to a
generic SG coefficient computation via least squares.
}
\keyword{internal}
