spectrace_normalize_spectra: Normalize spectrace data

View source: R/spectrace_normalize_spectra.R

spectrace_normalize_spectraR Documentation

Normalize spectrace data

Description

This function normalizes the spectral data.

Usage

spectrace_normalize_spectra(
  lightData,
  method = c("peak", "AUC", "wavelength", "response"),
  wavelength = NULL,
  response = c("vl", "sc", "mc", "lc", "rod", "mel"),
  keepNormCoefficient = FALSE
)

Arguments

lightData

Data frame containing the (calibrated) light data. Data needs to be in wide format (see spectrace_to_wide).

method

String specifying the normalization method. If method is "peak" (default), data is normalized such that the peak (max value) is equal to 1. If method is "AUC", data is normalized such that the area under the curve is equal to 1. If method is "wavelength", data is normalized to 1 at specified wavelength.

wavelength

Numeric. Wavelength to normalize at. Must be specified if method is "wavelength".

keepNormCoefficient

Logical. Should the normalization coefficient be kept in the data? Defaults to FALSE

Value

The original data frame with the spectral data replaced by the normalized spectral data.


steffenhartmeyer/spectrace documentation built on Dec. 4, 2024, 4:13 p.m.