% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/def.ucrt.dp01.fdas.R
\name{def.ucrt.dp01.fdas}
\alias{def.ucrt.dp01.fdas}
\title{Compute L1 (temporally aggregated) uncertainty due to a single-variable FDAS measurement}
\usage{
def.ucrt.dp01.fdas(data, VarUcrt, TypeFdas, ucrtCoef, ucrtData, log = NULL)
}
\arguments{
\item{data}{Numeric vector of (calibrated) L0' data measured from the FDAS.
A single aggregated uncertainty will be computed over the full timeseries.}

\item{VarUcrt}{A character string of the name of the variable contained in \code{data}.}

\item{TypeFdas}{A single character representing the type of FDAS measurement, either 'R' 
for resistance measurement, or 'V' for voltage measurement}

\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). 
Resistance-based FDAS uncertainty requires U_CVALR3 and U_CVALR4 coefficients. Voltage-based FDAS 
uncertainty requires U_CVALV3 and U_CVALV4 coefficients.}

\item{ucrtData}{A data frame of relevant L0' individual measurement uncertainty data corresponding 
as generated from one of the FDAS uncertainty functions in the NEONprocIS.cal package, e.g. def.ucrt.fdas.volt.poly. 
Columns must include:\cr
readout_time (POSIX),\cr
VarUcrt_raw (numeric) - raw L0 reading prior to calibration (resistance or voltage),\cr
VarUcrt_dervCal (numeric) - 1st derivative of calibration function evaluated at raw reading value, and\cr 
VarUcrt_ucrtComb (numeric) - standard uncertainty of individual measurement introduced by the Field DAS, \cr
where VarUcrt is the variable name specified in input \code{VarUcrt}.}

\item{log}{A logger object as produced by NEONprocIS.base::def.log.init to produce structured log
output. Defaults to NULL, in which the logger will be created and used within the function.}
}
\value{
A single numeric value representing the aggregated L1 FDAS uncertainty for the . Numeric NA is
returned if no applicable coefficient is found, with warning.
}
\description{
Definition function. Compute the L1 (temporally aggregated) uncertainty due to the a
single-variable FDAS measurement
}
\examples{
data <- c(.599,.598,.597)
ucrtCoef <- list(list(term='temp',start_date=as.POSIXct('2019-01-01',tz='GMT'),end_date=as.POSIXct('2019-01-02',tz='GMT'),Name='U_CVALR3',Value='0.000195'),
                 list(term='temp',start_date=as.POSIXct('2019-01-01',tz='GMT'),end_date=as.POSIXct('2019-01-02',tz='GMT'),Name='U_CVALR4',Value='0.0067'))
ucrtData <- data.frame(readout_time=as.POSIXct(c('2019-01-01 00:00','2019-01-01 00:01','2019-01-01 00:02'),tz='GMT'),
                       temp_raw=c(100.187,100.195,100.203),
                       temp_dervCal=c(2.5483,2.5481,2.5484),
                       temp_ucrtComb=c(0.06861,0.06860,0.06863),
                       stringsAsFactors=FALSE)
ucrtFdas <- NEONprocIS.stat::def.ucrt.dp01.fdas(data=data,VarUcrt='temp',TypeFdas='R',ucrtCoef=ucrtCoef,ucrtData=ucrtData)
}
\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.cal]{def.ucrt.fdas.volt.poly}

\link[NEONprocIS.cal]{def.ucrt.fdas.rstc.poly}
}
\author{
Cove Sturtevant \email{csturtevant@battelleecology.org}
}
\keyword{L1,}
\keyword{average}
\keyword{calibration,}
\keyword{uncertainty,}
