photobiologyInOut (version 0.4.16)

colorSpec2mspct: Convert 'colorSpec::colorSpec' objects

Description

Convert 'colorSpec::colorSpec' objects into spectral objects (xxxx_spct, xxxx_mspct) as defined in package 'photobiology' and vice versa preserving as much information as possible.

Usage

colorSpec2mspct(x, multiplier = 1, ...)

# S3 method for colorSpec as.source_spct(x, multiplier = 1, ...)

# S3 method for colorSpec as.source_mspct(x, multiplier = 1, ...)

# S3 method for colorSpec as.response_spct(x, multiplier = 1, ...)

# S3 method for colorSpec as.response_mspct(x, multiplier = 1, ...)

# S3 method for colorSpec as.filter_spct(x, multiplier = 1, ...)

# S3 method for colorSpec as.filter_mspct(x, multiplier = 1, ...)

# S3 method for colorSpec as.reflector_spct(x, multiplier = 1, ...)

# S3 method for colorSpec as.reflector_mspct(x, multiplier = 1, ...)

# S3 method for colorSpec as.chroma_mspct(x, multiplier = 1, ...)

colorSpec2spct(x, multiplier = 1, ...)

colorSpec2chroma_spct(x, multiplier = 1, ...)

# S3 method for colorSpec as.chroma_spct(x, multiplier = 1, ...)

# S3 method for colorSpec as.chroma_mspct(x, multiplier = 1, ...)

mspct2colorSpec(x, spct.data.var = NULL, multiplier = 1, ...)

spct2colorSpec(x, spct.data.var = NULL, multiplier = 1, ...)

chroma_spct2colorSpec(x, spct.data.var = NULL, multiplier = 1, ...)

Arguments

x

colorSpec object

multiplier

numeric A multiplier to be applied to the 'spc' data to do unit or scale conversion.

...

currently ignored.

spct.data.var

character The name of the variable to read spectral data from.

Warning!

Always check the sanity of the imported or exported data values, as guessing is needed when matching the different classes, and the functions defined here are NOT guaranteed to return valid data wihtout help from the user through optional function arguments.

Examples

Run this code
# NOT RUN {
library(colorSpec)
colorSpec2mspct(Fs.5nm)
colorSpec2spct(Fs.5nm)
colorSpec2mspct(C.5nm)
colorSpec2spct(C.5nm)

# }

Run the code above in your browser using DataLab