Learn R Programming

⚠️There's a newer version (0.12.0) of this package.Take me there.

photobiology

Package 'photobiology' defines a system of classes for storing spectral data and accompanying metadata. For each of these classes specialised summary methods, maths operators and functions are provided. In addition, classes for storing collections of objects of the classes for individual spectra are defined as well as 'apply' functions. Extraction and replacement operators are also implemented.

This package is the core of a suite of R packages for photobiological calculations described at the r4photobiology web site.

Copy Link

Version

Install

install.packages('photobiology')

Monthly Downloads

649

Version

0.9.11

License

GPL (>= 3)

Maintainer

Pedro Aphalo

Last Published

September 11th, 2016

Functions in photobiology (0.9.11)

absorptance

Absorptance
altitude

function to be numerically minimized
A.illuminant.spct

CIE A illuminant data
absorptance_spct

Calculate absorptance from spectral absorptance.
as_quantum_mol

Convert spectral energy irradiance into spectral photon irradiance
A2T

Convert absorbance into transmittance
as_quantum

Convert spectral energy irradiance into spectral photon irradiance
as_energy

Convert spectral photon irradiance into spectral energy irradiance
absorbance_spct

Calculate absorbance from spectral absorbance.
absorbance

Absorbance
as.generic_spct

Spectral-object copy constructor
check_spct

Check validity of spectral objects
ccd.spct

Spectral response of a back-thinned CCD image sensor.
calc_multipliers

Spectral weights
calc_source_output

Light-source spectral output
black_body.spct

Theoretical black body
c.generic_mspct

Combine collections of spectra
as.generic_mspct

Collection-of-spectra copy-constructor
average_spct

Average spectral data.
beesxyzCMF.spct

Honeybee xyz chromaticity colour matching function data
checkTimeUnit

Check the "time.unit" attribute of an existing source_spct object
ciev10.spct

Linear energy CIE 2008 luminous efficiency function 10 deg data
ciexyzCC10.spct

CIE xyz chromaticity coordinates (CC) 10 deg data
check_spectrum

Sanity check of a spectrum.
ciev2.spct

Linear energy CIE 2008 luminous efficiency function 2 deg data
ciexyzCMF10.spct

Linear energy CIE xyz colour matching function (CMF) 10 deg data
ciexyzCC2.spct

CIE xyz chromaticity coordinates 2 deg data
checkMspctVersion

Check that the "mspct.version" attribute is set
checkSpctVersion

Check that the "spct.version" attribute is set
check_w.length

Sanity check of wavelengths (internal function).
class_spct

Query which is the class of an spectrum
color

Color of an object
clear.spct

Theoretical spectrum of a clear clear material
ciexyzCMF2.spct

Linear energy CIE xyz colour matching function (CMF) 2 deg data
clip_wl

Clip head and/or tail of a spectrum
clear_body.spct

Theoretical clear body
clear_photobio.cache

clear the spectral weights cache
convertTimeUnit

Convert the "time.unit" attribute of an existing source_spct object
clean_spct

Clean a spectrum
clean

Clean (=replace) off-range values in a spectrum
cps2irrad

Conversion from counts per second to physical quantities
D2_spectrum

Calculate deuterim lamp output spectrum from fitted constants
day_night

Times for sun positions
date2tod

Convert date to time-of-day in hours
defunct

Defunct functions and methods
convolve_each

Convolve function for collections of spectra
dim.generic_mspct

Dimensions of an Object
copy_attributes

Copy attributes
D65.illuminant.spct

CIE D65 illuminant data
date2seconds

date argument check and conversion
energy_irradiance

Calculate (energy) irradiance from spectral irradiance
e2quantum_multipliers

Calculate energy to quantum multipliers
Extract

Extract or replace parts of a spectrum
Extract_mspct

Extract or replace members of a collection of spectra
e2q

Convert energy-based quantities into photon-based quantities.
fluence

Fluence
e2qmol_multipliers

Calculate energy to quantum (mol) multipliers
fscale

Rescale a spectrum using a summary function
fscale_spct

fscale a spectrum
fshift_spct

fshift a spectrum
getScaled

Get the "scaled" attribute
getSpctVersion

Get the "spct.version" attribute
is_tagged

Query if it is an spectrum is tagged
is_scaled

Query whether a generic spectrum has been scaled
e_fluence

Energy fluence
e_irrad

Energy irradiance
energy_ratio

Energy:energy ratio
eq_ratio

Energy:photon ratio
fshift

Shift the scale of a spectrum using a summary function
generic_mspct

Collection-of-spectra constructor
getNormalized

Get the "normalized" attribute
interpolate_wl

Map spectra to new wavelength values.
interpolate_spectrum

Calculate spectral values at a different set of wavelengths
getRfrType

Get the "Rfr.type" attribute
is.waveband

Query if it is a waveband
l_insert_hinges

Insert wavelength values into spectral data.
min

Wavelength minimum
minus-.generic_spct

Arithmetic Operators
mspct_classes

Names of multi-spectra classes
normalization

Normalization of an R object
polyester.spct

Transmittance spectrum of clear polyester film
getMspctVersion

Get the "mspct.version" attribute
q2e

Convert photon-based quantities into energy-based quantities
^.generic_spct

Arithmetic Operators
qe_ratio

Photon:energy ratio
getWhatMeasured

Get the "what.measured" attribute
getMultipleWl

Get the "multiple.wl" attribute
getWhenMeasured

Get the "when.measured" attribute
integrate_xy

Gives irradiance from spectral irradiance.
interpolate_spct

Map a spectrum to new wavelength values.
is_normalized

Query whether a generic spectrum has been normalized.
is_photon_based

Query if a spectrum contains photon- or energy-based data.
div_spectra

Divide two spectra, even if the wavelengths values differ
MathFun

Miscellaneous Mathematical Functions
max

Wavelength maximum
div-.generic_spct

Arithmetic Operators
filter_cps.mspct

Counts per second from a measurement of a plastic film
getWhereMeasured

Get the "where.measured" attribute
find_peaks

Find peaks in a spectrum
insert_hinges

Insert wavelength values into spectral data.
is_absorbance_based

Query if a spectrum contains absorbance or transmittance data
is_effective

Is an R object "effective"
normalize_range_arg

Normalize a range argument into a true numeric range
labels

Find labels from "waveband" object
normalize

Normalize spectral data
oper_spectra

Binary operation on two spectra, even if the wavelengths values differ
log

Logarithms and Exponentials
peaks

Peaks or local maxima
print

Print a spectral object
print.summary_generic_spct

Print spectral summary
range

Wavelength range
rbindspct

Row-bind spectra
get_peaks

Get peaks and valleys in a spectrum
resp_spct

Calculate response from spectral response
response

Integrated response
getBSWFUsed

Get the "bswf.used" attribute
irrad

Irradiance
irradiance

Photon (quantum) irradiance from spectral (energy) irradiance.
is.generic_mspct

Query class of spectrum objects
is.generic_spct

Query class of spectrum objects
midpoint

Central wavelength value
merge.generic_spct

Merge two generic_spct objects
photon_ratio

Photo:photon ratio
photon_irradiance

Photon irradiance
photobiology-package

Photobiological Calculations
q_irrad

Photon irradiance
rgb_spct

RGB color values
q_fluence

Photon fluence
rmDerivedMspct

Remove "generic_mspct" and derived class attributes.
setTimeUnit

Set the "time.unit" attribute of an existing source_spct object
setWhatMeasured

Set the "what.measured" attribute
shared_member_class

Classes common to all collection members.
sign

Sign
times-.generic_spct

Arithmetic Operators
split2mspct

Convert a 'wide' or untidy data frame into a collection of spectra
spread

Length of object in wavelength units
v_insert_hinges

Insert wavelength values into spectral data.
transmittance_spct

Calculate transmittance from spectral transmittance.
valleys

Valleys or local minima
yellow_gel.spct

Transmittance spectrum of yellow theatrical gel.
setWhenMeasured

Set the "when.measured" attribute
sun_angles

Solar angles
setWhereMeasured

Set the "where.measured" attribute
sun.spct

Solar spectral irradiance (simulated)
sun.daily.data

Daily solar spectral irradiance (simulated)
T2A

Convert transmittance into absorbance.
upgrade_spct

Upgrade one spectral object
upgrade_spectra

Upgrade one or more spectral objects
wb2tagged_spct

Create tagged spectrum from wavebands
white_body.spct

Theoretical white body
photons_energy_ratio

Photon:energy ratio
photodiode.spct

Spectral response of a GaAsP photodiode
q_ratio

Photon:photon ratio
plus-.generic_spct

Arithmetic Operators
setScaled

Set the "scaled" attribute
setGenericSpct

Convert an R object into a spectrum object.
setInstrDesc

Set the "instr.desc" attribute
q_response

Photon-based photo-response
setTfrType

Set the "Tfr.type" attribute
slash-.generic_spct

Arithmetic Operators
e_response

Energy-based photo-response
e_ratio

Energy:energy ratio
FEL_spectrum

Incandescent "FEL" lamp emission spectrum
f_dispatcher_spct

Math function dispatcher for spectra
getInstrDesc

Get the "instr.desc" attribute
getTfrType

Get the "Tfr.type" attribute
getInstrSettings

Get the "instr.settings" attribute
getTimeUnit

Get the "time.unit" attribute of an existing source_spct object
insert_spct_hinges

Insert new wavelength values into a spectrum
integrate_spct

Integrate spectral data.
is.old_spct

Query if an object has old class names
is.summary_generic_spct

Query class of spectrum summary objects
mod-.generic_spct

Arithmetic Operators
normalized_diff_ind

Calculate a normalized index.
msmsply

Multi-spct transform methods
opaque.spct

Theoretical spectrum of an opaque material
print.waveband

Print a "waveband" object
prod_spectra

Multiply two spectra, even if the wavelengths values differ
s_e_irrad2rgb

Spectrum to rgb color conversion
setBSWFUsed

Set the "bswf.used" attribute
summary_spct_classes

Function that returns a vector containing the names of spectral summary classes.
smooth_spct

Smooth a spectrum
Trig

Trigonometric Functions
transmittance

Transmittance
summary

Summary of a spectral object
setNormalized

Set the "normalized" attribute
setRfrType

Set the "Rfr.type" attribute
split_irradiance

Energy or photon irradiance for split spectrum regions
split_photon_irradiance

Photon irradiance for split spectrum regions
trim_waveband

Trim (or expand) head and/or tail
trim_wl

Trim head and/or tail of a spectrum
wb2rect_spct

Create tagged spectrum from wavebands
reflectance

Reflectance
wb2spct

Create spectrum from wavebands
source_spct

Spectral-object constructor
reflectance_spct

Calculate reflectance from spectral reflectance
spct_classes

Function that returns a vector containing the names of spectra classes.
subt_spectra

Subtract two spectra
sum_spectra

Add two spectra
sun.daily.spct

Daily solar spectral irradiance (simulated)
sun.data

Solar spectral irradiance (simulated)
twilight2angle

twilight argument check and conversion
untag

Remove tags
waveband_ratio

Photon or energy ratio
waveband

Waveband constructor method
round

Rounding of Numbers
rmDerivedSpct

Remove "generic_spct" and derived class attributes.
setInstrSettings

Set the "instr.settings" attribute
setMultipleWl

Set the "multiple.wl" attribute
split_bands

List-of-wavebands constructor
tag

Tag a spectrum
split_energy_irradiance

Energy irradiance for split spectrum regions
subset2mspct

Convert 'long' or tidy spectral data into a collection of spectra
stepsize

Stepsize
time2seconds

time argument check and conversion
trim_tails

Trim (or expand) head and/or tail
w_length_range2rgb

Wavelength range to rgb color conversion
trim_spct

Trim (or expand) head and/or tail
w_length2rgb

Wavelength to rgb color conversion