calibration_sampler {Xcertainty} | R Documentation |
Build an MCMC sampler that only uses calibration data to estimate measurement error parameters
calibration_sampler(data, priors, package_only = FALSE)
data |
Photogrammetric data formatted for Xcertainty models, required to
be an object with class |
priors |
|
package_only |
|
outputs a function to run a sampler, the function arguments are:
set the number of iterations
set the number samples to discard
set the thinning rate
# load example wide-format data
data("calibration")
# parse calibration study
calibration_data = parse_observations(
x = calibration,
subject_col = 'CO.ID',
meas_col = 'Lpix',
tlen_col = 'CO.L',
image_col = 'image',
barometer_col = 'Baro_Alt',
laser_col = 'Laser_Alt',
flen_col = 'Focal_Length',
iwidth_col = 'Iw',
swidth_col = 'Sw',
uas_col = 'uas'
)
# build sampler
sampler_data = calibration_sampler(
data = calibration_data,
priors = list(
image_altitude = c(min = 0.1, max = 130),
altimeter_bias = rbind(
data.frame(altimeter = 'Barometer', mean = 0, sd = 1e2),
data.frame(altimeter = 'Laser', mean = 0, sd = 1e2)
),
altimeter_variance = rbind(
data.frame(altimeter = 'Barometer', shape = .01, rate = .01),
data.frame(altimeter = 'Laser', shape = .01, rate = .01)
),
altimeter_scaling = rbind(
data.frame(altimeter = 'Barometer', mean = 1, sd = 1e1),
data.frame(altimeter = 'Laser', mean = 1, sd = 1e1)
),
pixel_variance = c(shape = .01, rate = .01)
),
# set to false to return sampler function
package_only = TRUE
)