Specialized function for calibration of TOMST TMS moisture sensor. Function calculate correction parameters for individual logger (slope and intercept) from TMS moisture measurements in demineralized water and dry air.
mc_calib_moisture(
raw_air,
raw_water,
t_air = 24,
t_water = 24,
ref_air = 114.534,
ref_water = 3634.723,
ref_t = mc_const_CALIB_MOIST_REF_T,
acor_t = mc_const_CALIB_MOIST_ACOR_T,
wcor_t = mc_const_CALIB_MOIST_WCOR_T
)Raw TMS moisture signal in air
Raw TMS moisture signal in water
temperature of air (default 24)
temperature of water (default 24)
raw air signal of reference logger used to derive soil calibration parameters (default 114.534)
raw air signal of reference logger used to derive soil calibration parameters (default 3634.723)
reference logger temperature (default 24)
temperature drift correction parameter in the air (default 1.911)
temperature drift correction parameter in the water (default 0.641)
list with correction factor and correction slope
This function calculate calibration parameters cor_slope and cor_intercept
accounting for individual differences in TMS moisture sensor signal in air and in water against reference
loggers which were used for estimation of parameters of soil VWC conversion curves.
These parameters must be loaded into myClim object mc_prep_calib_load()
prior to calling mc_calc_vwc().
Parameters for volumetric soil moisture conversion function available in my_Clim were derived for TOMST TMS3 logger version with
raw moisture signal 114 units in the air and 3634 in water. TOMST TMS4 logger version have different range of moisture signal:
in the air typically between 250 - 600 units and in water between 3650 and 3800 units.
Correction parameters for TMS4 loggers therefore can be expected in the range of values:
cor_factor = (-150; -450) and cor_slope = (100, 450)
# load example data
files <- c(system.file("extdata", "data_94184102_0.csv", package = "myClim"))
tomst_data <- mc_read_files(files, "TOMST")
#> 1 loggers
#> datetime range: 2020-10-06 09:00:00 - 2020-10-07 10:00:00
#> detected steps: (900s = 15min)
#> locality_id serial_number logger_name start_date end_date
#> 1 94184102 94184102 TMS_1 2020-10-06 09:00:00 2020-10-07 10:00:00
#> step_seconds count_duplicities count_missing count_disordered rounded
#> 1 900 0 0 0 FALSE
# vwc without calibration
tomst_data <- mc_calc_vwc(tomst_data, soiltype = "universal", output_sensor = "VWC_universal")
# load calibration
my_cor <- mc_calib_moisture(raw_air = 394, raw_water = 3728, t_air = 21, t_water = 20)
my_calib_tb <- data.frame(serial_number = c("94184102"), sensor_id = "TMS_moist",
datetime = as.POSIXct("2020-01-01 00:00"),
cor_factor = my_cor$cor_factor, cor_slope = my_cor$cor_slope)
tomst_data_cal <- mc_prep_calib_load(tomst_data, my_calib_tb)
# vwc using calibration
tomst_data_cal <- mc_calc_vwc(tomst_data_cal, soiltype = "universal",
output_sensor = "VWC_universal_calib")
# plot results
if (FALSE) { # \dontrun{
sensors <- mc_info(tomst_data_cal)$sensor_name
mc_plot_line(tomst_data_cal, sensors = c(sensors[startsWith(sensors,"VWC")])
+ ggplot2::scale_color_viridis_d(begin = 0.2, end = 0.8))} # }