2.1 Calibration and Uncertainty Functions - NEONScience/NEON-IS-data-processing GitHub Wiki

The calibration module accepts any calibration or uncertainty function in the NEONprocIS.cal package that meets input and output requirements. Similarly, the statistics module accepts any uncertainty function in the NEONprocIS.stat package that meets input and output requirements. Here is a list of the current calibration and uncertainty functions, and their appropriate use case(s). To determine which function(s) are appropriate for a given data product, refer to its Algorithm Theoretical Basis Document. If you create a custom function to be called in either the calibration or stats module, use one of the relevant functions below as a template - it will save you a lot of time and confusion. For more information about the functions below, refer to their documentation in the NEONprocIS.cal and NEONprocIS.stat packages. For guidance on how to add a new function to the NEONprocIS packages, see 3.0 Updating modules or creating new modules.

Calibration functions

Calibration takes L0 data as input, applies any applicable calibration coefficients, and returns L0' calibrated measurements. The typical scenario applies a polynomial function to a single L0 term, with the polynomial coefficients supplied in the calibration file. Alternatives to these functions may be created and used within the calibration module, but they must accept the same inputs as any of the calibration functions listed below, even if they are unused in the function. In short, the full L0 data frame and all relevant calibration information are supplied to the functions. See the documentation for these functions in the NEONprocIS.cal package to learn more.

def.cal.conv.poly: Applies the standard calibration polynomial to a single L0 stream using the CVALA# coefficients in the calibration file, where # indicates the polynomial degree. For example, y = CVALA0 + CVALA1x + CVALA2x^2 + ..., where y is the calibrated L0' output and x is the L0 stream.

def.cal.conv.poly.b: This function is identical to def.cal.conv.poly, but uses the CVALB# coefficients in the calibration file.

def.cal.conv.poly.m: This function is identical to def.cal.conv.poly, but uses the CVALM# coefficients in the calibration file.

L0' calibration uncertainty functions

The calibration uncertainty includes the repeatability and reproducibility of the sensor and the lab DAS and the uncertainty of the calibration procedures and coefficients including uncertainty in the standard (truth). This uncertainty is described in the calibration uncertainty section of the ATBD. Alternatives to these functions may be created and used within the calibration module, but they must accept the same inputs and return the outputs in a standardized format. Custom uncertainty functions may output any amount of variables/columns as needed, but the variable naming is important. Any variables in the output data frame that begin with ucrtMeas or ucrtFdas will be added in quadrature to represent the combined L0' uncertainty. See any one of these functions below in the NEONprocIS.cal package for more details.

def.ucrt.meas.cnst: Computes individual L0' measurement uncertainty as a constant value represented by the U_CVALA1 coefficient value in the calibration file.

def.ucrt.meas.mult: Similar to def.ucrt.meas.cnst, but computes individual L0' uncertainty as U_CVALA1*x, where x is the L0 data stream.

def.ucrt.wq.temp.conc: Individual L0' measurement uncertainty for temperature from the conductivity sensor as part of the water quality data product

def.ucrt.wq.do.conc: Individual L0' measurement uncertainty for dissolved oxygen (DO) concentration (mg/L) as part of the water quality data product

L0' FDAS uncertainty functions

Sensor output in voltage or resistance is typically measured by NEON's Field Data Acquisition System (FDAS, a.k.a. GRAPE). When a measurement is made by the FDAS, there is additional uncertainty in the reading due to the uncertainty in the resistance or voltage measurement itself. If this uncertainty applies, it will be indicated in the Field DAS uncertainty section of the ATBD. Alternatives to these functions may be created and used within the calibration module, but they must accept the same inputs and return the outputs in a standardized format. Custom uncertainty functions may output any amount of variables/columns as needed, but the variable naming is important. Any variables in the output data frame that begin with ucrtMeas or ucrtFdas will be added in quadrature to represent the combined L0' uncertainty. See any one of these functions below in the NEONprocIS.cal package for more details.

def.ucrt.fdas.rstc.poly: Computes L0' uncertainty imposed by a NEON FDAS when making resistance measurements and using a polynomial calibration conversion function with CVALA coefficients.

def.ucrt.fdas.volt.poly: Computes L0' uncertainty imposed by a NEON FDAS when making voltage measurements and using a polynomial calibration conversion function with CVALA coefficients.

L1 uncertainty functions

The L1 uncertainty typically includes the uncertainty due to natural variation, calibration uncertainty, and FDAS uncertainty (if applicable - NEON's Field Data Acquisition System, a.k.a. GRAPE), combined in quadrature and expanded to 95% confidence. The exact formulation for these and other uncertainty components is described in the uncertainty section of the ATBD. Alternatives to these functions may be created and used within the statistics module, but they must accept the same inputs and return the output in the same format. See any one of these functions below in the NEONprocIS.stat package for more details.

wrap.ucrt.dp01.cal.cnst: Computes L1 combined and expanded uncertainty for a single-variable L0' stream subject to natural variation and calibration uncertainty. Uncertainty due to natural variation is represented by the standard error. Calibration uncertainty is represented by calibration uncertainty coefficient U_CVALA3 (a constant).

wrap.ucrt.dp01.cal.cnst.fdas.rstc: Computes L1 combined and expanded uncertainty for a single-variable L0' stream subject to natural variation, calibration uncertainty, and resistance-based FDAS uncertainty. Uncertainty due to natural variation is represented by the standard error. Calibration uncertainty is represented by calibration uncertainty coefficient U_CVALA3 (a constant). Resistance-based FDAS uncertainty is the uncertainty from a single-channel resistance measurement.

wrap.ucrt.dp01.cal.mult: Computes L1 combined and expanded uncertainty for a single-variable L0' stream subject to natural variation and calibration uncertainty. Uncertainty due to natural variation is represented by the standard error. Calibration uncertainty is represented by calibration uncertainty coefficient U_CVALA3*max(x), where max(x) is the maximum L0' data value over the aggregation interval.

wrap.ucrt.dp01.cal.mult.fdas.volt: Computes L1 combined and expanded uncertainty for a single-variable L0' stream subject to natural variation, calibration uncertainty, and voltage-based FDAS uncertainty. Uncertainty due to natural variation is represented by the standard error. Calibration uncertainty is represented by calibration uncertainty coefficient U_CVALA3*max(x), where max(x) is the maximum L0' data value over the aggregation interval. Voltage-based FDAS uncertainty is the uncertainty from a single-channel voltage measurement.