*2.3. Spectral Processing*

The raw spectral curves from both the plant (in situ) and grain (ex situ) were smoothed using a Savitsky–Golay filter [38] to reduce noise (SG; Figure 4a). A third-order, 10-band moving polynomial was fitted upon the original spectral signatures [39]. Data within each 5 nm window were averaged (e.g., the value at 600 nm is average of 598–602 nm). First derivatives (hereafter, FD) were computed from the smoothed spectra (Figure 4b). Computing derivatives allows minor differences in reflectance values to be exploited and permits discrimination of key points along the spectral curves (i.e., inflections and maxima) corresponding to biophysical and biochemical components that would otherwise be difficult to detect [40,41]. Lastly, wavebands associated with atmospheric noise (1290–1495, 1705–2045, and 2355–2500 nm) and splicing points within the spectroradiometer (350–395 and 1005–1015 nm) were removed, resulting in 277 wavebands between 400–2350 nm, at a spectral resolution of 5 nm. The reflectance/derivative values at these wavebands ultimately serve as the independent variables for the statistical analyses discussed below.

**Figure 4.** Typical canopy spectra (noisy atmospheric windows removed) for tef (*Eragrostis tef*) showing (**a**) Savitsky–Golay filtered reflectance curve and (**b**) first derivative (FD) transformation.
