Predict in-situ gamma dose rate.

# S4 method for CalibrationCurve
predict(object, spectra, epsilon = 0.03,
  simplify = FALSE, ...)

Arguments

object

An object of class CalibrationCurve.

spectra

An optional object of class GammaSpectra in which to look for variables with which to predict. If omitted, the fitted values are used.

epsilon

A numeric value.

simplify

A logical scalar: should the result be simplified to a matrix? If FALSE (default), returns a list.

...

Currently not used.

Value

If simplify is FALSE returns a list of length-two numeric vectors (default), else returns a matrix.

See also

Other dose rate: fit

Examples

# Import CNF files for calibration spc_dir <- system.file("extdata/crp2a/calibration", package = "gamma") spc_calib <- read(spc_dir, skip = TRUE) # Set dose rate values and errors for each spectrum setDoseRate(spc_calib) <- list( BRIQUE = c(1986, 36), C341 = c(850, 21), C347 = c(1424, 24), GOU = c(1575, 17), LMP = c(642, 18), MAZ = c(1141, 12), PEP = c(2538, 112) ) # Build the calibration curve calib_curve <- fit( spc_calib, noise = c(value = 1190, error = 1), range = c(200, 2800) ) # Check the linear model summary(calib_curve[["model"]])
#> #> Call: #> stats::lm(formula = fit_formula, data = fit_data, weights = fit_weights) #> #> Residuals: #> 1 2 3 4 5 6 7 #> -7.890 13.441 -2.945 -53.620 23.586 -9.501 36.929 #> #> Coefficients: #> Estimate Std. Error t value Pr(>|t|) #> (Intercept) -8.646e+02 4.768e+01 -18.13 9.37e-06 *** #> signal_value 3.441e-02 6.853e-04 50.21 5.92e-08 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> #> Residual standard error: 32.05 on 5 degrees of freedom #> Multiple R-squared: 0.998, Adjusted R-squared: 0.9976 #> F-statistic: 2521 on 1 and 5 DF, p-value: 5.92e-08 #>
# Plot the curve plot(calib_curve) + ggplot2::labs(x = "Signal", y = "Dose rate [µGy/y]")
# Estimate gamma dose rates (dose_rate <- predict(calib_curve, spc_calib))
#> $BRIQUE #> [1] 1993.88962 71.79665 #> #> $C341 #> [1] 836.55857 30.12355 #> #> $C347 #> [1] 1426.94479 51.38271 #> #> $GOU #> [1] 1628.62023 58.64447 #> #> $LMP #> [1] 618.41398 22.26849 #> #> $MAZ #> [1] 1150.50136 41.42817 #> #> $PEP #> [1] 2501.07145 90.06074 #>