R/prep.R
mc_prep_calib_load.Rd
This function loads calibration parameters from data.frame logger_calib_table
and stores them in the myClim object metadata. This function
does not calibrate data. For calibration itself run mc_prep_calib()
mc_prep_calib_load(data, calib_table)
myClim object in Raw-format. see myClim-package
data.frame with columns (serial_number
, sensor_id
, datetime
, cor_factor
, cor_slope
)
myClim object with loaded calibration information in metadata.
Microclimatic records are not calibrated, only ready for calibration.
To calibrate records run mc_prep_calib()
This function allows user to provide correction coefficients cor_factor
and cor_slope
for linear sensor calibration.
Calibrated data have by default the form of linear function terms:
calibrated value = original value * (cor_slope + 1) + cor_factor
In case of one-point calibration, cor_factor
can be estimated as:
cor_factor = reference value - sensor value
and cor_slope
should be set to 0.
This function loads sensor-specific
calibration coefficients from calib_table and stores them into myClim Raw-format
object metadata. The calib_table is data.frame with 5 columns:
serial_number = serial number of the logger
sensor_id = name of sensor, e.g. "TMS_T1"
datetime = the date of the calibration in POSIXct type
cor_factor = the correction factor
cor_slope = the slope of calibration curve (in case of one-point calibration, use cor_slope = 0)
It is not possible to change calibration parameters for already calibrated sensor.
This prevents repeated calibrations. Once mc_prep_calib()
is called then
it is not allowed to provide new calibration data, neither run calibration again.