Convert continuous-wave fNIRS intensity to optical density
Source:R/optical-density.R
intensityToOD.RdOptical density is calculated with the natural-log convention
-log(I / I0). The reference intensity and any replacement of non-positive
cells are explicit and recorded in provenance.
Arguments
- x
A governed continuous-wave
PhysioExperiment.- assay_name
Exact input assay name.
NULLis allowed only when one eligible intensity assay exists.- baseline
Exactly
"mean"or"median".- baseline_interval
Optional closed interval in seconds.
- reference
Optional positive scalar or vector with one value per measurement.
- nonpositive
Exactly
"error"or"replace".- replacement
Explicit positive scalar used only with
nonpositive = "replace".- output_assay
Exact name for the new optical-density assay.
Examples
pe <- PhysioNIRS:::.nirs_demo_object()
od <- intensityToOD(pe)
SummarizedExperiment::assayNames(od)
#> [1] "raw" "OD"