Title: | Estimation of Calibration Equations for Temperature Data Loggers |
---|---|
Description: | Contains all functions required to (1) Read in temperature logger calibration data (External and Internal) (2) calculate approximate calibration functions to convert raw temps to true and raw temps to SE of approx (3) output a file containing calibration results by logger for use as a bulk upload to FLEObs database. |
Authors: | Colin Millar [aut, cre], Karen Millidine [aut] |
Maintainer: | Colin Millar <[email protected]> |
License: | file LICENSE |
Version: | 1.0-0 |
Built: | 2024-11-11 04:44:34 UTC |
Source: | https://github.com/faskally/loggercal |
Contains all functions required to (1) Read in temperature logger calibration data (External and Internal) (2) calculate approximate calibration functions to convert raw temps to true and raw temps to SE of approx (3) output a file containing calibration results by logger for use as a bulk upload to FLEObs database
Colin Millar and Karen Millidine
This function: * identifies calibration loggers * chooses one calibration logger to be used * finds the best lag * fits a calibration model to each non-calibration logger * returns models for calibration and SE models
calibration(internalCal, externalCalMod, nsim = 999)
calibration(internalCal, externalCalMod, nsim = 999)
internalCal |
A number. |
externalCalMod |
A number. |
nsim |
number of simulations to run in the estimation. |
nsim
is the simulations used to back calculate the logger
error. Normally a large number like 99 or 999 should be used, but
note that this can take a while to run.
models for calibration and SE models.
Function to provide an easy interface to use the calibation methods in the loggercal package
doCalibration(path = ".", nsim = 999, trim = FALSE)
doCalibration(path = ".", nsim = 999, trim = FALSE)
path |
the location on disk where the calibration folders are initially searched for (the default where the directory selection dialogue opens). |
nsim |
number of simulations to run (see |
trim |
if TRUE the user can trim internal logger data at the start and end of the data series interactively (default = FALSE) |
When running the function the user will be asked to set various directorise where internal and external calibration data are stored: internalCalDir = the filepath of where the internal calibration file is located externalCalDir = the filepath of where the external calibration file is located which is appropriate for the internal calibration that you are working on
## Not run: # set up a demo calibration folder structure # please set this to a suitable location on your system path <- "D:\\temp\\Calibration_data" caldir <- file.path(path, "Logger_calibrations", "250416") ukasdir <- file.path(path, "External_Calibrations", "010915") dir.create(caldir, recursive = TRUE) dir.create(ukasdir, recursive = TRUE) file.copy( system.file( "calibration_files", "FullCalibration_250416.csv", package = "loggercal"), caldir) file.copy( system.file( "calibration_files", "UKASCalibration_319151.csv", package = "loggercal"), ukasdir) doCalibration(path, nsim = 10) ## End(Not run)
## Not run: # set up a demo calibration folder structure # please set this to a suitable location on your system path <- "D:\\temp\\Calibration_data" caldir <- file.path(path, "Logger_calibrations", "250416") ukasdir <- file.path(path, "External_Calibrations", "010915") dir.create(caldir, recursive = TRUE) dir.create(ukasdir, recursive = TRUE) file.copy( system.file( "calibration_files", "FullCalibration_250416.csv", package = "loggercal"), caldir) file.copy( system.file( "calibration_files", "UKASCalibration_319151.csv", package = "loggercal"), ukasdir) doCalibration(path, nsim = 10) ## End(Not run)
Description
findLag(internalCal, lagtry = -10:10)
findLag(internalCal, lagtry = -10:10)
internalCal |
A number. |
lagtry |
A number. |
The sum of x
and y
.
Description
findStartSec(cal)
findStartSec(cal)
cal |
A number. |
The sum of x
and y
.
Description
findStopSec(cal)
findStopSec(cal)
cal |
A number. |
The sum of x
and y
.
Description
getCoefs(reverseCalMod)
getCoefs(reverseCalMod)
reverseCalMod |
A number. |
The sum of x
and y
.
Description
lagmod(x, y, lag = 0, formula = y ~ s(x, k = 3))
lagmod(x, y, lag = 0, formula = y ~ s(x, k = 3))
x |
A number. |
y |
A number. |
lag |
A number. |
formula |
A number. |
The sum of x
and y
.
Description
## S3 method for class 'InternalCal' plot(x, type = "scaled", xlim = NULL, ...)
## S3 method for class 'InternalCal' plot(x, type = "scaled", xlim = NULL, ...)
x |
A number. |
type |
A number. |
xlim |
A number. |
... |
other graphics parameters to pass on to plotting commands. |
The sum of x
and y
.
Description
## S3 method for class 'ExternalCal' print(x, ...)
## S3 method for class 'ExternalCal' print(x, ...)
x |
A number. |
... |
Numeric, complex, or logical vectors. |
The sum of x
and y
.
Description
## S3 method for class 'InternalCal' print(x, ...)
## S3 method for class 'InternalCal' print(x, ...)
x |
A number. |
... |
Numeric, complex, or logical vectors. |
The sum of x
and y
.
Description
readExternalCal(dirname)
readExternalCal(dirname)
dirname |
The directory containing the UKAS calibration files. |
The sum of x
and y
.
Description
readInternalCal(dirname)
readInternalCal(dirname)
dirname |
A number. |
The sum of x
and y
.
Description
saveCalPlot(filename, plotFunc, width = 17, height = 17, ppi = 1200)
saveCalPlot(filename, plotFunc, width = 17, height = 17, ppi = 1200)
filename |
A number. |
plotFunc |
A function which returns a plot |
width |
A number. |
height |
A number. |
ppi |
A number. |
1 + 1
1 + 1
Description
Description
tableCoefs(coefs, cal) tableCoefs(coefs, cal)
tableCoefs(coefs, cal) tableCoefs(coefs, cal)
coefs |
A number. |
cal |
A number. |
The sum of x
and y
.
The sum of x
and y
.
Description
trim(x, ...)
trim(x, ...)
x |
A number. |
... |
Numeric, complex, or logical vectors. |
The sum of x
and y
.