2.2.3. SNR Based Setup Optimisation

To determine the optimal setup, four ETs (1 ms, 10 ms, 30 ms and 50 ms), three heights (30 cm, 70 cm and 110 cm) and three camera off-zenith angles (0◦, 8◦ and 17◦) were tested for scanning in conditions of 300–400 <sup>W</sup>/m<sup>2</sup> for the leek canopy, which are fully sunny conditions during winter, and 800–900 <sup>W</sup>/m<sup>2</sup> for the potato canopy, which are fully sunny conditions during summer. For each of the 36 configurations, around 1000 linescans were taken with the hyperspectral camera at a framerate of 60 Hz. These scans were then stored in one data cube per setup through Lumo software (Specim, Finland). These cubes were subsequently corrected using Matlab software (The Mathworks, Inc., USA) using a white and dark reference value (Equation (1)). The pyranometer was placed in a

fixed position before the measurements began and indicated whether a new white reference sample needed to be taken. The white reference target (SphereOptics, Germany, Alucore reflectance target, 500 × 500 mm, 95% reflectance, calibrated) was measured with the hyperspectral camera to obtain a reference value at the start of each measurement and during measurements if the solar radiation varied more than 75 <sup>W</sup>/m2. This measurement was done in exactly the same conditions as those of the crop. The dark reference value was measured at the start of the experiment by closing the hyperspectral camera shutter. These reference values were later used to correct the data using following equation:

$$R\_\text{-}\text{corr} = (R\_\text{-}\text{raw-}R\_\text{-}\text{dr})/(R\_\text{-}\text{wr-}R\_\text{-}\text{dr})\tag{1}$$

where R\_cor is the corrected reflectance value of the measured sample, R\_wr is the white reference value, or 'maximum' reflectance value, R\_raw is the raw reflectance of the sample measured and R\_dr is the dark, or minimum, reflectance value. In practice, the white reference value was not the maximum value even though it has a reflectance of 95%, because specular reflection could occur. We calculated the SNR using the method used in Whetton et al. (2017) [19]. The SNR of each scan was calculated by first correcting the hyperspectral data cube according to Equation (1), after which nonplant pixels were deleted based on the NDVI value [37,38]. We then, per wavelength, divided the mean of the reflectance values over all plant pixels of the image by the standard deviation over all reflectance values of all plant pixels of the image. This led to 224 SNR values, each belonging to one wavelength. Then, the average of these 224 SNR values was taken to yield one SNR value per scan (Figure 3). Scans were taken until each tested setup had hyperspectral data cubes containing at least 30 leek or potato plants.

**Figure 3.** Signal-to-noise ratio (SNR) calculated for the hyperspectral camera for different combinations of setup parameters of height (H), angle (A) and exposure time (ET). Values of SNR were calculated for each wavelength, over all pixels, and then averaged over all wavelengths. Both datasets (leek and potato) have been normalised to be between 0 and 1 using (x-min)/range.

To understand the individual e ffect of each setup parameter on the resulting SNR, principal component analysis (PCA) was carried out using RStudio (RStudio Inc., USA). The input of the PCA analysis was a matrix containing 36 rows (one for each tested setup) and 4 columns for the height, angle and ET of each setup, with the corresponding SNR value. No normalisation was performed on the SNR data, because tests indicated that each of the available normalisation algorithms in the FactoMineR R package lead to principal components (PCs) that represented less of the variability in the data compared to the PCs obtained without normalisation. The results were represented in PCA factor map plots, also using the FactoMineR R package.

### 2.2.4. Effect of Artificial Lighting on Hyperspectral Measurements in the Field

To evaluate the effect of artificial light, hyperspectral measurements were taken with the predetermined optimal setup from Section 2, which consisted of an angle of 17◦, an ET of 1 ms and a height of approximately 30 cm above a leek canopy. Exact height above crop canopy varied slightly due to the inhomogeneity of the leek plant height within each row and because the field was not perfectly level. Two measurements were taken, one in winter and one in early spring. The first measurement was taken on a day with clear weather, representing sunny conditions, whereas the second measurement was taken under fully overcast, cloudy conditions. The effect of the artificial light was determined by comparing the average reflectance values from crop canopy and white reference target measurements. To compare the shape of the reflectance curve between light on and off scenarios, the reflectance curves were normalised to have values in the 0 to 1 range by using (x-min)/range. These spectra were analysed using Matlab software (The Mathworks, Inc., USA) and ENVI (Harris Geospatial, USA) software.

### 2.2.5. Effect of Artificial Lighting on Thermal Measurements in the Field

To test the effect of the artificial light on the thermal measurements, a series of images of the leek crop row were taken using the aluminium frame designed for the 3 by 3 m leek plots. These images were taken at 1 Hz. To compare between light on/off treatments, average temperature values were calculated with Flir Tools software (Flir Systems, USA), for each of the images. These values were then plotted using Excel software (Microsoft, USA). The ratio of crop to bare soil is not representative for normal field conditions for images captured at the edge of the crop row. We therefore compared treatments based on images of the middle of the row. It was not possible to reliably remove soil pixels from crop pixels in the thermal images, because there was a lot of overlap between the apparent temperature of the leaves and that of the soil. For this reason, we visually compared thermal patterns on the leaves. These patterns allowed us to see if the top of the crop canopy was heated by the artificial light. We also compared average temperature values over the entire image, since the same spot in the field was measured over different setups (lamps on or lamps off). This means the amount of soil was the same for each setup and it was therefore possible to compare the effect of artificial light on the average apparent temperature between treatments. We followed the development of the crop over several weeks to determine whether any disease was naturally occurring during time of measurement.
