% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/def.ucrt.dp01.cal.mult.R
\name{def.ucrt.dp01.cal.mult}
\alias{def.ucrt.dp01.cal.mult}
\title{Compute L1 (temporally aggregated) calibration uncertainty represented as a multiplier to the max L0' value}
\usage{
def.ucrt.dp01.cal.mult(
  data,
  ucrtCoef,
  NameCoef = "U_CVALA3",
  VarUcrt,
  TimeAgrBgn,
  TimeAgrEnd,
  log = NULL
)
}
\arguments{
\item{data}{Numeric vector of (calibrated) L0' data.
A single aggregated uncertainty will be computed for the full timeseries.}

\item{ucrtCoef}{A list of uncertainty coefficients, each a list containing at a minimum the list 
elements: term (name of L0' term for which the coefficient applies - string), start_date (POSIX), 
end_date(POSIX), Name (of the coefficient - string), 
and Value (of the coefficient - string or numeric, to be interpreted as numeric).}

\item{NameCoef}{The name of the coefficient that represents the value to be multiplied with
the maximum L0' value. Defaults to U_CVALA3. Note that the units in the calibration file may say percent, but it is really a scale factor.}

\item{VarUcrt}{A character string of the target variable/term for which uncertainty will be computed 
(i.e. the name of the term/variable for the data in \code{data}).}

\item{TimeAgrBgn}{A POSIX time value indicating the beginning of the temporal aggregation interval (inclusive)}

\item{TimeAgrEnd}{A POSIX time value indicating the end of the temporal aggregation interval (non-inclusive)}

\item{log}{A logger object as produced by NEONprocIS.base::def.log.init to produce structured log
output in addition to standard R error messaging. Defaults to NULL, in which the logger will be
created and used within the function.}
}
\value{
A single numeric value representing the aggregated L1 calibration uncertainty. If the aggregation
interval spans multiple coefficient start and end periods, the maximum value of the applicable coefficients 
is used as the multiplier. Numeric NA is returned if no applicable coefficient is found, with warning.
}
\description{
Definition function. Compute the L1 (temporally aggregated) calibration uncertainty due
to the accuracy of the instrumentation in the form of Truth and Trueness. The uncertainty 
is represented by a percentage multiplier (coefficient provided by CVAL) to the maximum L0' value.
}
\examples{
data <- c(827.7,827.8,831.3)
ucrtCoef <- list(list(term='linePAR',start_date=as.POSIXct('2019-01-01',tz='GMT'),end_date=as.POSIXct('2019-01-02',tz='GMT'),Name='U_CVALA3',Value='0.0141'),
                 list(term='linePAR',start_date=as.POSIXct('2019-01-01',tz='GMT'),end_date=as.POSIXct('2019-01-02',tz='GMT'),Name='U_CVALA1',Value='0.0143'))
ucrtCal <- NEONprocIS.stat::def.ucrt.dp01.cal.mult(data=data,ucrtCoef=ucrtCoef,NameCoef='U_CVALA3',VarUcrt='linePAR',TimeAgrBgn=as.POSIXct('2019-01-01 00:00',tz='GMT'),TimeAgrEnd=as.POSIXct('2019-01-01 00:30',tz='GMT'))
}
\references{
License: (example) GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007
NEON.DOC.000785 TIS Level 1 Data products Uncertainty Budget Estimation Plan
NEON.DOC.000746 Calibration Fixture and Sensor Uncertainty Analysis: CVAL 2014 Uncertainty Manual
}
\seealso{
\link[NEONprocIS.stat]{wrap.ucrt.dp01}

\link[NEONprocIS.stat]{wrap.ucrt.dp01.cal.mult.fdas.volt}
}
\author{
Cove Sturtevant \email{csturtevant@battelleecology.org}
}
\keyword{L1,}
\keyword{average}
\keyword{calibration,}
\keyword{uncertainty,}
