v2.2.9 - proxy
Bug fixes
-
continuumRemoval(): fixedNAvalues produced for spectra with very low
reflectance in the first bands and high NIR reflectance. The fixed boundary
offset of 1 wavelength unit used in the internal convex hull computation was
too large for spectra with fine spectral resolution or wavelengths expressed
in units other than nanometres. The offset is now derived from the actual
spectral resolution at each edge, making the behaviour unit-agnostic
(reported by @jbferet,
#80). -
continuumRemoval(): fixedNaNproduced at the first wavelength when its
reflectance value is exactly zero. The continuum-removed value is now set to
1 (no absorption feature) at bands where both the spectrum and the continuum
are zero
(#80). -
continuumRemoval(): corrected a long-standing typo in themethod
argument:"substraction"has been replaced by"subtraction". A
deprecation warning is issued if the old spelling is passed explicitly. -
standardNormalVariate(): zero-variance rows (e.g. constant spectra) are
now handled silently by returning zero rather thanNaNor raising an
error. Single spectra passed as a numeric vector are now also accepted and
coerced to a one-row matrix before processing. -
readASD(): fixed a file-connection leak (the binary connection was not
closed on early exit); fixed a missing output branch in the txt-format path
when the position index is greater than 2, which silently dropped spectra. -
read_nircal(): fixed a file-connection leak (connection was only closed
inside a progress-reporting branch, leaving it open otherwise). -
cochranTest(): fixed an invalid argument name in bothprcomp()calls
(.scale = FALSE→scale. = FALSE), which produced spurious warnings and
incorrect PC scores. -
continuumRemoval(): removed an erroneous@exporttag from the internal
helpercr_fun(), which caused an "undocumented object" NOTE in
R CMD check.
New features
-
standardNormalVariate(): now accepts a single spectrum passed as a numeric
vector, which is coerced to a one-row matrix before processing. -
detrend(): addedsnvargument (defaultTRUE) to allow polynomial
detrending without a prior SNV transformation. The default behaviour is
unchanged and remains consistent with Barnes et al. (1989). Setsnv = FALSEto apply pure polynomial detrending independently of SNV, for
example as a separate step in a pre-processing pipeline. -
The vignette has been reorganised into three separate vignettes with
extended examples: (1) an introduction to the package, (2) signal
processing, and (3) calibration sampling.
Documentation
-
spliceCorrection(): clarified thatwavmust be a numeric vector of
length equal toncol(X), not a two-element range vector
(#69). -
duplex(): a warning is now issued whenkexceedsfloor(nrow(X) / 2),
the maximum number of samples selectable per set. Previously,kwas
silently capped to this limit with no indication to the user (reported by
@georgejr45).