Correct flights data
correct_flights_data.RdCorrects flights data to transform IR-measured temperatures into operative temperatures
Usage
correct_flights_data(
flights_data,
otm_splines,
time_correction,
time_correction_metric,
flight_specific_correction
)Arguments
- flights_data
A data frame of flights data obtained through the
rnp_flights_datafunction.- otm_splines
A nested
tibbleobtained using thegen_otm_splinesfunction.- time_correction
A logical value (
TRUEorFALSE) indicating whether first correction step should be applied. If set toTRUE, the function will add the mean, median or mode (based ontime_correction_metric, see below) bias between all surface and operative temperatures in tiles where OTMs were present to all surface temperature measurements within a flight. The goal of applying a time correction is to account for day and time-specific systematic biases between operative and surface temperatures which may be a by product of the inherent nature of thermal imaging (e.g., measurements being influenced by light conditions, sensor calibration. etc.).time_correction = TRUEifflight_specific_correction = FALSEis recommended.- time_correction_metric
A character string indicating the metric to be used to perform the time correction. The metric can be either
"mean","median"or"mode".For most cases,"mean"is recommended but"median"could be used if outliers are detected. To evaluate the best method, use the functioneval_flights_correctionalso included inthrone.- flight_specific_correction
A logical value (
TRUEorFALSE) indicating whether the second correction step should be applied to all flights or each flight specifically. If set toTRUEthe second correction step will also incorporate the effects of day of the year and minute of day into the linear model from which the correction will be performed.