Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

source_spct

Spectral-object constructor


Description

These functions can be used to create spectral objects derived from generic_spct. They take as arguments numeric vectors for the data character scalars for attributes, and a logical flag.

Usage

source_spct(
  w.length = NULL,
  s.e.irrad = NULL,
  s.q.irrad = NULL,
  time.unit = c("second", "day", "exposure"),
  bswf.used = c("none", "unknown"),
  comment = NULL,
  strict.range = getOption("photobiology.strict.range", default = FALSE),
  multiple.wl = 1L,
  idfactor = NULL,
  ...
)

calibration_spct(
  w.length = NULL,
  irrad.mult = NA_real_,
  comment = NULL,
  instr.desc = NA,
  multiple.wl = 1L,
  idfactor = NULL,
  ...
)

raw_spct(
  w.length = NULL,
  counts = NA_real_,
  comment = NULL,
  instr.desc = NA,
  instr.settings = NA,
  multiple.wl = 1L,
  idfactor = NULL,
  ...
)

cps_spct(
  w.length = NULL,
  cps = NA_real_,
  comment = NULL,
  instr.desc = NA,
  instr.settings = NA,
  multiple.wl = 1L,
  idfactor = NULL,
  ...
)

generic_spct(
  w.length = NULL,
  comment = NULL,
  multiple.wl = 1L,
  idfactor = NULL,
  ...
)

response_spct(
  w.length = NULL,
  s.e.response = NULL,
  s.q.response = NULL,
  time.unit = c("second", "day", "exposure"),
  response.type = c("response", "action"),
  comment = NULL,
  multiple.wl = 1L,
  idfactor = NULL,
  ...
)

filter_spct(
  w.length = NULL,
  Tfr = NULL,
  Tpc = NULL,
  Afr = NULL,
  A = NULL,
  Tfr.type = c("total", "internal"),
  comment = NULL,
  strict.range = getOption("photobiology.strict.range", default = FALSE),
  multiple.wl = 1L,
  idfactor = NULL,
  ...
)

reflector_spct(
  w.length = NULL,
  Rfr = NULL,
  Rpc = NULL,
  Rfr.type = c("total", "specular"),
  comment = NULL,
  strict.range = getOption("photobiology.strict.range", default = FALSE),
  multiple.wl = 1L,
  idfactor = NULL,
  ...
)

object_spct(
  w.length = NULL,
  Rfr = NULL,
  Tfr = NULL,
  Afr = NULL,
  Tfr.type = c("total", "internal"),
  Rfr.type = c("total", "specular"),
  comment = NULL,
  strict.range = getOption("photobiology.strict.range", default = FALSE),
  multiple.wl = 1L,
  idfactor = NULL,
  ...
)

chroma_spct(
  w.length = NULL,
  x,
  y,
  z,
  comment = NULL,
  strict.range = getOption("photobiology.strict.range", default = FALSE),
  multiple.wl = 1L,
  idfactor = NULL,
  ...
)

Arguments

w.length

numeric vector with wavelengths in nanometres

s.e.irrad

numeric vector with spectral energy irradiance in [W m-2 nm-1] or [J d-1 m-2 nm-1]

s.q.irrad

numeric A vector with spectral photon irradiance in [mol s-1 m-2 nm-1] or [mol d-1 m-2 nm-1].

time.unit

character string indicating the time unit used for spectral irradiance or exposure ("second" , "day" or "exposure") or an object of class duration as defined in package lubridate.

bswf.used

character A string indicating the BSWF used, if any, for spectral effective irradiance or exposure ("none" or the name of the BSWF).

comment

character A string to be added as a comment attribute to the object created.

strict.range

logical Flag indicating whether off-range values result in an error instead of a warning.

multiple.wl

numeric Maximum number of repeated w.length entries with same value.

idfactor

character Name of factor distinguishing multiple spectra when stored logitudinally (required if mulitple.wl > 1).

...

other arguments passed to tibble()

irrad.mult

numeric vector with multipliers for each detector pixel.

instr.desc

a list

counts

numeric vector with raw counts expressed per scan

instr.settings

a list

cps

numeric vector with linearized raw counts expressed per second

s.e.response

numeric vector with spectral energy irradiance in W m-2 nm-1 or J d-1 m-2 nm-1

s.q.response

numeric vector with spectral photon irradiance in mol s-1 m-2 nm-1 or mol d-1 m-2 nm-1

response.type

a character string, either "response" or "action".

Tfr

numeric vector with spectral transmittance as fraction of one

Tpc

numeric vector with spectral transmittance as percent values

Afr

numeric vector of absorptance as fraction of one

A

numeric vector of absorbance values (log10 based a.u.)

Tfr.type

character string indicating whether transmittance and absorptance values are "total" or "internal" values

Rfr

numeric vector with spectral reflectance as fraction of one

Rpc

numeric vector with spectral reflectance as percent values

Rfr.type

character A string, either "total" or "specular".

x, y, z

numeric colour coordinates

Value

A object of class generic_spct or a class derived from it, depending on the function used. In other words an object of a class with the same name as the constructor function.

Note

The functions can be used to add only one spectral quantity to a spectral object. Some of the functions have different arguments, for the same quantity expressed in different units. An actual parameter can be supplied to only one of these formal parameters in a given call to any of these functions.

"internal" transmittance is defined as the transmittance of the material body itself, while "total" transmittance includes the effects of surface reflectance on the amount of light transmitted.

See Also


photobiology

Photobiological Calculations

v0.10.10
GPL (>= 2)
Authors
Pedro J. Aphalo [aut, cre] (<https://orcid.org/0000-0003-3385-972X>), Titta K. Kotilainen [ctb] (<https://orcid.org/0000-0002-2822-9734>), Glenn Davis [ctb], Agnese Fazio [ctb]
Initial release
2022-03-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.