spectrace_calculate_quantities: Calculate (alpha-opic) quantities from calibrated spectrace...

View source: R/spectrace_calculate_quantities.R

spectrace_calculate_quantitiesR Documentation

Calculate (alpha-opic) quantities from calibrated spectrace data

Description

This function calculates selected optical quantities from the calibrated spectrace data. Spectral irradiance is interpolated to desired resolution. CCT is calculated with McCamy's approximation.

Usage

spectrace_calculate_quantities(
  lightData,
  quantities = c("ALL", "sc", "mc", "lc", "mel", "rod", "scEDI", "mcEDI", "lcEDI",
    "melEDI", "rodEDI", "scELR", "mcELR", "lcELR", "melELR", "rodELR", "scDER", "mcDER",
    "lcDER", "melDER", "rodDER", "cie1924_v2_lux", "cie2008_v2_lux", "cie2008_v10_lux",
    "CCT", "cie1931_XYZ", "cie1931_x", "cie1931_y", "cie1964_x", "cie1964_y", "CLA",
    "CS"),
  resolution = c("5nm", "1nm"),
  interp_method = c("pchip", "linear", "none"),
  keep_spectral_data = TRUE
)

Arguments

lightData

Data frame containing the calibrated light data.

quantities

Quantities to be calculated. Can be any or multiple of: ("ALL", "sc", "mc", "lc", "mel", "rod", "scEDI", "mcEDI", "lcEDI", "melEDI", "rodEDI", "scELR", "mcELR", "lcELR", "melELR", "rodELR", "scDER", "mcDER", "lcDER", "melDER", "rodDER", "cie1924_v2_lux", "cie2008_v2_lux", "cie2008_v10_lux", "CCT", "cie1931_x", "cie1931_y", "cie1931_XYZ", "cie1964_x", "cie1964_y", "CLA", "CS"). If "ALL" (the default), all quantities will be calculated and added to the data frame.

resolution

String specifying the resolution of the output spectrum. Can be "5nm" (default) or "1nm".

interp_method

Method for interpolation. Can be "pchip" (smooth piecewise hermetic interpolation), "linear", or "none". Defaults to "pchip".

keep_spectral_data

Logical. Should the spectral irradiance columns be kept? Defaults to TRUE.

Value

Data frame extended with specified quantities. If keep_spectral_data is FALSE then the spectral data columns will be removed from the original data frame.


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