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.15

License

GPL (>= 2)

Maintainer

Pedro Aphalo

Last Published

April 29th, 2017

Functions in photobiology (0.9.15)

A.illuminant.spct

CIE A illuminant data
A2T

Convert absorbance into transmittance
D65.illuminant.spct

CIE D65 illuminant data
FEL.BN.9101.165

Data for typical calibration lamps
D2.UV586

Data for typical calibration lamps
D2.UV653

Data for typical calibration lamps
D2.UV654

Data for typical calibration lamps
D2_spectrum

Calculate deuterim lamp output spectrum from fitted constants
FEL_spectrum

Incandescent "FEL" lamp emission spectrum
MathFun

Miscellaneous Mathematical Functions
absorptance

Absorptance
absorptance_spct

Calculate absorptance from spectral absorptance.
beesxyzCMF.spct

Honeybee xyz chromaticity colour matching function data
black_body.spct

Theoretical black body
absorbance

Absorbance
absorbance_spct

Calculate absorbance from spectral absorbance.
calc_source_output

Light-source spectral output
ccd.spct

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

Convert transmittance into absorbance.
Trig

Trigonometric Functions
as_quantum

Convert spectral energy irradiance into spectral photon irradiance
as_quantum_mol

Convert spectral energy irradiance into spectral photon irradiance
as.solar_date

Convert a solar_time object into solar_date object
as_energy

Convert spectral photon irradiance into spectral energy irradiance
as_tod

Convert date to time-of-day in hours, minutes or seconds
average_spct

Average spectral data.
checkTimeUnit

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

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

Check that the "spct.version" attribute is set
clip_wl

Clip head and/or tail of a spectrum
color

Color of an object
ciev10.spct

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

Linear energy CIE 2008 luminous efficiency function 2 deg data
class_spct

Query which is the class of an spectrum
clean

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

Spectral weights
ciexyzCC10.spct

CIE xyz chromaticity coordinates (CC) 10 deg data
as.generic_mspct

Collection-of-spectra copy-constructor
as.generic_spct

Spectral-object copy constructor
check_spectrum

Sanity check of a spectrum.
check_w.length

Sanity check of wavelengths (internal function).
c.generic_mspct

Combine collections of spectra
check_spct

Check validity of spectral objects
ciexyzCMF10.spct

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

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

Divide two spectra, even if the wavelengths values differ
e2q

Convert energy-based quantities into photon-based quantities.
ciexyzCC2.spct

CIE xyz chromaticity coordinates 2 deg data
dim.generic_mspct

Dimensions of an Object
div-.generic_spct

Arithmetic Operators
copy_attributes

Copy attributes from one R object to another
cps2irrad

Conversion from counts per second to physical quantities
e_ratio

Energy:energy ratio
e_response

Energy-based photo-response
fscale

Rescale a spectrum using a summary function
fscale_spct

fscale a spectrum
generic_mspct

Collection-of-spectra constructor
getBSWFUsed

Get the "bswf.used" attribute
getWhatMeasured

Get the "what.measured" attribute
energy_irradiance

Calculate (energy) irradiance from spectral irradiance
energy_ratio

Energy:energy ratio
getWhereMeasured

Get the "where.measured" attribute
get_peaks

Get peaks and valleys in a spectrum
filter_cps.mspct

Counts per second from a measurement of a plastic film
find_peaks

Find peaks in a spectrum
getScaled

Get the "scaled" attribute
getSpctVersion

Get the "spct.version" attribute
green_leaf.spct

Green birch leaf reflectance.
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
convolve_each

Convolve function for collections of spectra
insert_hinges

Insert wavelength values into spectral data.
integrate_xy

Gives irradiance from spectral irradiance.
interpolate_spct

Map a spectrum to new wavelength values.
is_scaled

Query whether a generic spectrum has been scaled
is_tagged

Query if it is an spectrum is tagged
is.summary_generic_spct

Query class of spectrum summary objects
is.waveband

Query if it is a waveband
julian_day

Solar astronomy using Meeus' algorithm
l_insert_hinges

Insert wavelength values into spectral data.
normalized_diff_ind

Calculate a normalized index.
opaque.spct

Theoretical spectrum of an opaque material
photon_irradiance

Photon irradiance
photon_ratio

Photo:photon ratio
print.summary_generic_spct

Print spectral summary
clean_spct

Clean a spectrum
clear.spct

Theoretical spectrum of a clear clear material
day_night

Times for sun positions
defunct

Defunct functions and methods
e2qmol_multipliers

Calculate energy to quantum (mol) multipliers
e2quantum_multipliers

Calculate energy to quantum multipliers
fluence

Fluence
format.solar_time

Encode in a Common Format
eq_ratio

Energy:photon ratio
Extract

Extract or replace parts of a spectrum
Extract_mspct

Extract or replace members of a collection of spectra
labels

Find labels from "waveband" object
log

Logarithms and Exponentials
msmsply

Multi-spct transform methods
mspct_classes

Names of multi-spectra classes
f_dispatcher_spct

Math function dispatcher for spectra
getInstrDesc

Get the "instr.desc" attribute
getInstrSettings

Get the "instr.settings" attribute
getTfrType

Get the "Tfr.type" attribute
getWhenMeasured

Get the "when.measured" attribute
is.old_spct

Query if an object has old class names
is.solar_time

Query class
e_fluence

Energy fluence
e_irrad

Energy irradiance
fshift

Shift the scale of a spectrum using a summary function
fshift_spct

fshift a spectrum
prod_spectra

Multiply two spectra, even if the wavelengths values differ
q2e

Convert photon-based quantities into energy-based quantities
setMultipleWl

Set the "multiple.wl" attribute
getMspctVersion

Get the "mspct.version" attribute
getMultipleWl

Get the "multiple.wl" attribute
insert_spct_hinges

Insert new wavelength values into a spectrum
integrate_spct

Integrate spectral data.
getNormalized

Get the "normalized" attribute
getRfrType

Get the "Rfr.type" attribute
interpolate_spectrum

Calculate spectral values at a different set of wavelengths
setNormalized

Set the "normalized" attribute
setWhereMeasured

Set the "where.measured" attribute
shared_member_class

Classes common to all collection members.
sun_angles

Solar angles
tag

Tag a spectrum
is.generic_mspct

Query class of spectrum objects
is.generic_spct

Query class of spectrum objects
midpoint

Central wavelength value
min

Wavelength minimum
is_absorbance_based

Query if a spectrum contains absorbance or transmittance data
is_effective

Is an R object "effective"
na.omit.source_spct

Handle Missing Values in Objects
normalization

Normalization of an R object
plus-.generic_spct

Arithmetic Operators
q_ratio

Photon:photon ratio
q_response

Photon-based photo-response
rmDerivedMspct

Remove "generic_mspct" and derived class attributes.
getTimeUnit

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

Irradiance
irradiance

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

Check the "instr.desc" attribute
isValidInstrSettings

Check the "instr.settings" attribute
photons_energy_ratio

Photon:energy ratio
trim_tails

Trim (or expand) head and/or tail
trim_waveband

Trim (or expand) head and/or tail
v_insert_hinges

Insert wavelength values into spectral data.
valleys

Valleys or local minima
print.waveband

Print a "waveband" object
response

Integrated response
rgb_spct

RGB color values
setTfrType

Set the "Tfr.type" attribute
interpolate_wl

Map spectra 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.
max

Wavelength maximum
merge.generic_spct

Merge two generic_spct objects
polyester.spct

Transmittance spectrum of clear polyester film
^.generic_spct

Arithmetic Operators
oper_spectra

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

Peaks or local maxima
print

Print a spectral object
minus-.generic_spct

Arithmetic Operators
mod-.generic_spct

Arithmetic Operators
normalize

Normalize spectral data
normalize_range_arg

Normalize a range argument into a true numeric range
rmDerivedSpct

Remove "generic_spct" and derived class attributes.
setRfrType

Set the "Rfr.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.
print.solar_time

Print solar time and solar date objects
q_fluence

Photon fluence
q_irrad

Photon irradiance
round

Rounding of Numbers
split2mspct

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

List-of-wavebands constructor
sun.daily.data

Daily solar spectral irradiance (simulated)
sun.daily.spct

Daily solar spectral irradiance (simulated)
trim_wl

Trim head and/or tail of a spectrum
photobiology-package

photobiology: Photobiological Calculations
photodiode.spct

Spectral response of a GaAsP photodiode
rbindspct

Row-bind spectra
reflectance

Reflectance
qe_ratio

Photon:energy ratio
range

Wavelength range
reflectance_spct

Calculate reflectance from spectral reflectance
resp_spct

Calculate response from spectral response
setTimeUnit

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

Smooth a spectrum
solar_time

Local solar time
setWhatMeasured

Set the "what.measured" attribute
setWhenMeasured

Set the "when.measured" attribute
split_photon_irradiance

Photon irradiance for split spectrum regions
white_led.source_spct

White led bulb spectrum
yellow_gel.spct

Transmittance spectrum of yellow theatrical gel.
setInstrDesc

Set the "instr.desc" attribute
setInstrSettings

Set the "instr.settings" attribute
sign

Sign
slash-.generic_spct

Arithmetic Operators
stepsize

Stepsize
spread

Length of object in wavelength units
sun.data

Solar spectral irradiance (simulated)
sun.spct

Solar spectral irradiance (simulated)
upgrade_spct

Upgrade one spectral object
upgrade_spectra

Upgrade one or more spectral objects
subt_spectra

Subtract two spectra
sum_spectra

Add two spectra
transmittance_spct

Calculate transmittance from spectral transmittance.
trimInstrDesc

Trim the "instr.desc" attribute
wb2rect_spct

Create tagged spectrum from wavebands
wb2spct

Create spectrum from wavebands
s_e_irrad2rgb

Spectrum to rgb color conversion
setBSWFUsed

Set the "bswf.used" attribute
setGenericSpct

Convert an R object into a spectrum object.
split_energy_irradiance

Energy irradiance for split spectrum regions
split_irradiance

Energy or photon irradiance for split spectrum regions
times-.generic_spct

Arithmetic Operators
transmittance

Transmittance
trimInstrSettings

Trim the "instr.settings" attribute
trim_spct

Trim (or expand) head and/or tail
subset2mspct

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

Summary of a spectral object
summary_spct_classes

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

Time difference between two time zones
w_length2rgb

Wavelength to rgb color conversion
w_length_range2rgb

Wavelength range to rgb color conversion
white_led.cps_spct

White led bulb spectrum
untag

Remove tags
white_led.raw_spct

White led bulb spectrum
twilight2angle

twilight argument check and conversion
waveband

Waveband constructor method
waveband_ratio

Photon or energy ratio
wb2tagged_spct

Create tagged spectrum from wavebands
white_body.spct

Theoretical white body