Learn R Programming

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

photobiolgy

Package 'photobiolgy' defines a system of classes for storing spectral data and accompanying metdata. 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.9

License

GPL (>= 3)

Maintainer

Pedro Aphalo

Last Published

August 1st, 2016

Functions in photobiology (0.9.9)

A2T

Convert absorbance into transmittance
absorptance_spct

Calculate absorptance from spectral absorptance.
absorbance_spct

Calculate absorbance from spectral absorbance.
as_quantum

Convert spectral energy irradiance into spectral photon irradiance
absorbance

Absorbance
A.illuminant.spct

CIE A illuminant data
altitude

function to be numerically minimized
as_quantum_mol

Convert spectral energy irradiance into spectral photon irradiance
absorptance

Absorptance
as_energy

Convert spectral photon irradiance into spectral energy irradiance
calc_multipliers

Spectral weights
check_spct

Check validity of spectral objects
c.generic_mspct

Combine collections of spectra
calc_source_output

Light-source spectral output
black_body.spct

Theoretical black body
as.generic_spct

Spectral-object copy constructor
average_spct

Average spectral data.
ccd.spct

Spectral response of a back-thinned CCD image sensor.
beesxyzCMF.spct

Honeybee xyz chromaticity colour matching function data
as.generic_mspct

Collection-of-spectra copy-constructor
check_spectrum

Sanity check of a spectrum.
ciexyzCC2.spct

CIE xyz chromaticity coordinates 2 deg data
checkTimeUnit

Check the "time.unit" attribute of an existing source_spct object
check_w.length

Sanity check of wavelengths (internal function).
ciexyzCC10.spct

CIE xyz chromaticity coordinates (CC) 10 deg data
ciev2.spct

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

Linear energy CIE 2008 luminous efficiency function 10 deg data
checkMspctVersion

Check that the "mspct.version" attribute is set
ciexyzCMF10.spct

Linear energy CIE xyz colour matching function (CMF) 10 deg data
checkSpctVersion

Check that the "spct.version" attribute is set
clear_photobio.cache

clear the spectral weights cache
clean_spct

Clean a spectrum
clean

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

Color of an object
convertTimeUnit

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

Theoretical spectrum of a clear clear material
clear_body.spct

Theoretical clear body
clip_wl

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

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

Query which is the class of an spectrum
date2tod

Convert date to time-of-day in hours
day_night

Times for sun positions
defunct

Defunct functions and methods
dim.generic_mspct

Dimensions of an Object
cps2irrad

Conversion from counts per second to physical quantities
div_spectra

Divide two spectra, even if the wavelengths values differ
D2_spectrum

Calculate deuterim lamp output spectrum from fitted constants
e2q

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

Arithmetic Operators
e2qmol_multipliers

Calculate energy to quantum (mol) multipliers
f_dispatcher_spct

Math function dispatcher for spectra
FEL_spectrum

Incandescent "FEL" lamp emission spectrum
get_peaks

Get peaks and valleys in a spectrum
getBSWFUsed

Get the "bswf.used" attribute
energy_ratio

Energy:energy ratio
fscale

Rescale a spectrum using a summary function
eq_ratio

Energy:photon ratio
fshift_spct

fshift a spectrum
getTfrType

Get the "Tfr.type" attribute
getTimeUnit

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

Calculate energy to quantum multipliers
fluence

Fluence
energy_irradiance

Calculate (energy) irradiance from spectral irradiance
fscale_spct

fscale a spectrum
getWhereMeasured

Get the "where.measured" attribute
insert_hinges

Insert wavelength values into spectral data.
insert_spct_hinges

Insert new wavelength values into a spectrum
is.waveband

Query if it is a waveband
integrate_spct

Integrate spectral data.
l_insert_hinges

Insert wavelength values into spectral data.
merge.generic_spct

Merge two generic_spct objects
midpoint

Central wavelength value
print.waveband

Print a "waveband" object
prod_spectra

Multiply two spectra, even if the wavelengths values differ
date2seconds

date argument check and conversion
D65.illuminant.spct

CIE D65 illuminant data
e_ratio

Energy:energy ratio
Extract

Extract or replace parts of a spectrum
Extract_mspct

Extract or replace members of a collection of spectra
e_response

Energy-based photo-response
getMspctVersion

Get the "mspct.version" attribute
getWhatMeasured

Get the "what.measured" attribute
getMultipleWl

Get the "multiple.wl" attribute
reflectance_spct

Calculate reflectance from spectral reflectance
getWhenMeasured

Get the "when.measured" attribute
reflectance

Reflectance
rmDerivedSpct

Remove "generic_spct" and derived class attributes.
setWhenMeasured

Set the "when.measured" attribute
round

Rounding of Numbers
setWhereMeasured

Set the "where.measured" attribute
stepsize

Stepsize
times-.generic_spct

Arithmetic Operators
subset2mspct

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

Trim (or expand) head and/or tail
transmittance_spct

Calculate transmittance from spectral transmittance.
convolve_each

Convolve function for collections of spectra
trim_tails

Trim (or expand) head and/or tail
copy_attributes

Copy attributes
e_fluence

Energy fluence
e_irrad

Energy irradiance
filter_cps.mspct

Counts per second from a measurement of a plastic film
find_peaks

Find peaks in a spectrum
fshift

Shift the scale of a spectrum using a summary function
generic_mspct

Collection-of-spectra constructor
getScaled

Get the "scaled" attribute
interpolate_spct

Map a spectrum to new wavelength values.
integrate_xy

Gives irradiance from spectral irradiance.
getSpctVersion

Get the "spct.version" attribute
is.summary_generic_spct

Query class of spectrum summary objects
is.old_spct

Query if an object has old class names
labels

Find labels from "waveband" object
log

Logarithms and Exponentials
normalization

Normalization of an R object
mspct_classes

Names of multi-spectra classes
range

Wavelength range
rbindspct

Row-bind spectra
interpolate_spectrum

Calculate spectral values at a different set of wavelengths
interpolate_wl

Map spectra to new wavelength values.
is.generic_mspct

Query class of spectrum objects
is.generic_spct

Query class of spectrum objects
max

Wavelength maximum
MathFun

Miscellaneous Mathematical Functions
oper_spectra

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

Peaks or local maxima
^.generic_spct

Arithmetic Operators
polyester.spct

Transmittance spectrum of clear polyester film
q_ratio

Photon:photon ratio
q_response

Photon-based photo-response
setTfrType

Set the "Tfr.type" attribute
setScaled

Set the "scaled" attribute
source_spct

Spectral-object constructor
spct_classes

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

Transmittance
sun.daily.data

Daily solar spectral irradiance (simulated)
sun_angles

Solar angles
Trig

Trigonometric Functions
upgrade_spct

Upgrade one spectral object
waveband_ratio

Photon or energy ratio
waveband

Waveband constructor method
upgrade_spectra

Upgrade one or more spectral objects
getNormalized

Get the "normalized" attribute
getRfrType

Get the "Rfr.type" attribute
irradiance

Photon (quantum) irradiance from spectral (energy) irradiance.
irrad

Irradiance
mod-.generic_spct

Arithmetic Operators
msmsply

Multi-spct transform methods
photobiology-package

'Photobiological' Calculations
photodiode.spct

Spectral response of a GaAsP photodiode
photon_irradiance

Photon irradiance
photon_ratio

Photo:photon ratio
setGenericSpct

Convert an R object into a spectrum object.
setInstrDesc

Set the "instr.desc" attribute
split_irradiance

Energy or photon irradiance for split spectrum regions
setWhatMeasured

Set the "what.measured" attribute
setTimeUnit

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

Photon irradiance for split spectrum regions
subt_spectra

Subtract two spectra
sum_spectra

Add two spectra
sun.daily.spct

Daily solar spectral irradiance (simulated)
sun.data

Solar spectral irradiance (simulated)
q_fluence

Photon fluence
q_irrad

Photon irradiance
rmDerivedMspct

Remove "generic_mspct" and derived class attributes.
rgb_spct

RGB color values
split_bands

List-of-wavebands constructor
split_energy_irradiance

Energy irradiance for split spectrum regions
tag

Tag a spectrum
wb2tagged_spct

Create tagged spectrum from wavebands
time2seconds

time argument check and conversion
white_body.spct

Theoretical white body
getInstrSettings

Get the "instr.settings" attribute
getInstrDesc

Get the "instr.desc" attribute
is_absorbance_based

Query if a spectrum contains absorbance or transmittance data
is_effective

Is an R object "effective"
is_scaled

Query whether a generic spectrum has been scaled
is_tagged

Query if it is an spectrum is tagged
normalized_diff_ind

Calculate a normalized index.
opaque.spct

Theoretical spectrum of an opaque material
photons_energy_ratio

Photon:energy ratio
plus-.generic_spct

Arithmetic Operators
trim_waveband

Trim (or expand) head and/or tail
trim_wl

Trim head and/or tail of a spectrum
yellow_gel.spct

Transmittance spectrum of yellow theatrical gel.
min

Wavelength minimum
is_photon_based

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

Query whether a generic spectrum has been normalized.
minus-.generic_spct

Arithmetic Operators
normalize

Normalize spectral data
normalize_range_arg

Normalize a range argument into a true numeric range
print

Print a spectral object
print.summary_generic_spct

Print spectral summary
resp_spct

Calculate response from spectral response
setNormalized

Set the "normalized" attribute
setRfrType

Set the "Rfr.type" attribute
response

Integrated response
slash-.generic_spct

Arithmetic Operators
smooth_spct

Smooth a spectrum
summary_spct_classes

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

Summary of a spectral object
sun.spct

Solar spectral irradiance (simulated)
T2A

Convert transmittance into absorbance.
v_insert_hinges

Insert wavelength values into spectral data.
s_e_irrad2rgb

Spectrum to rgb color conversion
setBSWFUsed

Set the "bswf.used" attribute
qe_ratio

Photon:energy ratio
q2e

Convert photon-based quantities into energy-based quantities
setMultipleWl

Set the "multiple.wl" attribute
setInstrSettings

Set the "instr.settings" attribute
shared_member_class

Classes common to all collection members.
sign

Sign
split2mspct

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

Length of object in wavelength units
wb2rect_spct

Create tagged spectrum from wavebands
valleys

Valleys or local minima
wb2spct

Create spectrum from wavebands
twilight2angle

twilight argument check and conversion
untag

Remove tags
w_length_range2rgb

Wavelength range to rgb color conversion
w_length2rgb

Wavelength to rgb color conversion