Many ASD FieldSpec and similar VNIR-SWIR spectrometers use multiple detectors to cover the full spectral range. During spectral acquisition, small calibration differences between adjacent detectors can introduce artificial offset jumps ("detector splice" or "detector discontinuity") at the detector boundaries, typically around 1000 nm and 1800 nm. These discontinuities are instrumental artifacts rather than real spectral features and may negatively affect spectral analyses, particularly first- and second-derivative transformations, continuum removal, and machine learning applications. This script removes the detector splice artifacts using the following procedure:
-
For each sample, the mean reflectance of several bands immediately before and after each detector boundary is calculated.
-
The difference between these two means is treated as the detector offset.
-
The calculated offset is subtracted from all wavelengths following the detector boundary (1000 nm and 1800 nm), thereby aligning the adjacent detectors while preserving the spectral shape.
-
Finally, the reflectance values at the boundary wavelengths (1000 nm and 1800 nm) are replaced by the average of their two neighbouring wavelengths. This removes the small notch that may remain after offset correction and eliminates artificial spikes in derivative spectra.
The procedure preserves genuine spectral absorption features while correcting discontinuities caused by detector mismatch.