Package 'loggercal'

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

Help Index


Tools for calibrating field temperature 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

Author(s)

Colin Millar and Karen Millidine


Fit a calibration regression and estimate logger error.

Description

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

Usage

calibration(internalCal, externalCalMod, nsim = 999)

Arguments

internalCal

A number.

externalCalMod

A number.

nsim

number of simulations to run in the estimation.

Details

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.

Value

models for calibration and SE models.


POINT AND CLICK CALIBRATION CODE

Description

Function to provide an easy interface to use the calibation methods in the loggercal package

Usage

doCalibration(path = ".", nsim = 999, trim = FALSE)

Arguments

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 calibration)

trim

if TRUE the user can trim internal logger data at the start and end of the data series interactively (default = FALSE)

Details

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

Examples

## 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)

Add together two numbers.

Description

Description

Usage

findLag(internalCal, lagtry = -10:10)

Arguments

internalCal

A number.

lagtry

A number.

Value

The sum of x and y.


Add together two numbers.

Description

Description

Usage

findStartSec(cal)

Arguments

cal

A number.

Value

The sum of x and y.


Add together two numbers.

Description

Description

Usage

findStopSec(cal)

Arguments

cal

A number.

Value

The sum of x and y.


Add together two numbers.

Description

Description

Usage

getCoefs(reverseCalMod)

Arguments

reverseCalMod

A number.

Value

The sum of x and y.


Add together two numbers.

Description

Description

Usage

lagmod(x, y, lag = 0, formula = y ~ s(x, k = 3))

Arguments

x

A number.

y

A number.

lag

A number.

formula

A number.

Value

The sum of x and y.


Add together two numbers.

Description

Description

Usage

## S3 method for class 'InternalCal'
plot(x, type = "scaled", xlim = NULL, ...)

Arguments

x

A number.

type

A number.

xlim

A number.

...

other graphics parameters to pass on to plotting commands.

Value

The sum of x and y.


Add together two numbers.

Description

Description

Usage

## S3 method for class 'ExternalCal'
print(x, ...)

Arguments

x

A number.

...

Numeric, complex, or logical vectors.

Value

The sum of x and y.


Add together two numbers.

Description

Description

Usage

## S3 method for class 'InternalCal'
print(x, ...)

Arguments

x

A number.

...

Numeric, complex, or logical vectors.

Value

The sum of x and y.


Add together two numbers.

Description

Description

Usage

readExternalCal(dirname)

Arguments

dirname

The directory containing the UKAS calibration files.

Value

The sum of x and y.


Add together two numbers.

Description

Description

Usage

readInternalCal(dirname)

Arguments

dirname

A number.

Value

The sum of x and y.


Save calibration plot as a png file

Description

Description

Usage

saveCalPlot(filename, plotFunc, width = 17, height = 17, ppi = 1200)

Arguments

filename

A number.

plotFunc

A function which returns a plot

width

A number.

height

A number.

ppi

A number.

Examples

1 + 1

Add together two numbers.

Description

Description

Description

Usage

tableCoefs(coefs, cal)

tableCoefs(coefs, cal)

Arguments

coefs

A number.

cal

A number.

Value

The sum of x and y.

The sum of x and y.


Add together two numbers.

Description

Description

Usage

trim(x, ...)

Arguments

x

A number.

...

Numeric, complex, or logical vectors.

Value

The sum of x and y.