cal_params <- list(
scale = c(1.015, 1.017, 1.027),
offset = c(0.00128, 0.0383, 0.0138),
temperature_offset = c(0, 0, 0),
error = NA,
light_denominator = 48,
light_numerator = 911
)
rawdata <- data.frame(
time = c(rep(1726650857, 5)),
x = c(0.2421875, 0.24609375, 0.25390625, 0.24609375, 0.23828125),
y = c(-0.04296875, -0.04687500, -0.03515625, -0.03125000, -0.04296875),
z = c(-0.9453125, -0.9453125, -0.9531250, -0.9531250, -0.9609375),
light = c(rep(22, 5)),
button = c(rep(0, 5)),
temp = c(rep(21.3, 5)),
volts = c(rep(4.0896, 5))
)
calibrated <- apply_calibration(rawdata, cal_params, "GENEActiv 1.1")
Run the code above in your browser using DataLab