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

License

GPL (>= 2)

Maintainer

Pedro Aphalo

Last Published

December 18th, 2016

Functions in photobiology (0.9.13)

as_tod

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

Calculate absorptance from spectral absorptance.
A.illuminant.spct

CIE A illuminant data
as_quantum_mol

Convert spectral energy irradiance into spectral photon irradiance
as_energy

Convert spectral photon irradiance into spectral energy irradiance
absorbance

Absorbance
as_quantum

Convert spectral energy irradiance into spectral photon irradiance
A2T

Convert absorbance into transmittance
absorptance

Absorptance
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.
beesxyzCMF.spct

Honeybee xyz chromaticity colour matching function data
black_body.spct

Theoretical black body
as.generic_spct

Spectral-object copy constructor
as.generic_mspct

Collection-of-spectra copy-constructor
calc_multipliers

Spectral weights
c.generic_mspct

Combine collections of spectra
average_spct

Average spectral data.
as.solar_date

Convert a solar_time object into solar_date object
checkSpctVersion

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

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

CIE xyz chromaticity coordinates 2 deg data
ciexyzCC10.spct

CIE xyz chromaticity coordinates (CC) 10 deg data
check_w.length

Sanity check of wavelengths (internal function).
checkMspctVersion

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

Query which is the class of an spectrum
clean_spct

Clean a spectrum
check_spectrum

Sanity check of a spectrum.
check_spct

Check validity of spectral objects
clean

Clean (=replace) off-range values in a spectrum
clear_body.spct

Theoretical clear body
convertTimeUnit

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

Conversion from counts per second to physical quantities
copy_attributes

Copy attributes from one R object to another
convolve_each

Convolve function for collections of spectra
div-.generic_spct

Arithmetic Operators
div_spectra

Divide two spectra, even if the wavelengths values differ
f_dispatcher_spct

Math function dispatcher for spectra
FEL_spectrum

Incandescent "FEL" lamp emission spectrum
e2q

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

Calculate energy to quantum (mol) multipliers
Extract

Extract or replace parts of a spectrum
Extract_mspct

Extract or replace members of a collection of spectra
ciexyzCMF2.spct

Linear energy CIE xyz colour matching function (CMF) 2 deg data
ciexyzCMF10.spct

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

Calculate deuterim lamp output spectrum from fitted constants
D2.UV586

Data for typical calibration lamps
defunct

Defunct functions and methods
dim.generic_mspct

Dimensions of an Object
generic_mspct

Collection-of-spectra constructor
FEL.BN.9101.165

Data for typical calibration lamps
fshift

Shift the scale of a spectrum using a summary function
filter_cps.mspct

Counts per second from a measurement of a plastic film
find_peaks

Find peaks in a spectrum
clip_wl

Clip head and/or tail of a spectrum
fluence

Fluence
color

Color of an object
D2.UV653

Data for typical calibration lamps
D2.UV654

Data for typical calibration lamps
fscale

Rescale a spectrum using a summary function
getRfrType

Get the "Rfr.type" attribute
getNormalized

Get the "normalized" attribute
fshift_spct

fshift a spectrum
getWhereMeasured

Get the "where.measured" attribute
D65.illuminant.spct

CIE D65 illuminant data
insert_hinges

Insert wavelength values into spectral data.
day_night

Times for sun positions
e_ratio

Energy:energy ratio
e_response

Energy-based photo-response
eq_ratio

Energy:photon ratio
energy_ratio

Energy:energy ratio
format.solar_time

Encode in a Common Format
fscale_spct

fscale a spectrum
getMspctVersion

Get the "mspct.version" attribute
getMultipleWl

Get the "multiple.wl" attribute
is_effective

Is an R object "effective"
is_absorbance_based

Query if a spectrum contains absorbance or transmittance data
labels

Find labels from "waveband" object
log

Logarithms and Exponentials
^.generic_spct

Arithmetic Operators
normalized_diff_ind

Calculate a normalized index.
ciev2.spct

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

Theoretical spectrum of an opaque material
ciev10.spct

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

Transmittance spectrum of clear polyester film
clear_photobio.cache

clear the spectral weights cache
clear.spct

Theoretical spectrum of a clear clear material
e_fluence

Energy fluence
e_irrad

Energy irradiance
e2quantum_multipliers

Calculate energy to quantum multipliers
getInstrSettings

Get the "instr.settings" attribute
insert_spct_hinges

Insert new wavelength values into a spectrum
getInstrDesc

Get the "instr.desc" attribute
energy_irradiance

Calculate (energy) irradiance from spectral irradiance
is_normalized

Query whether a generic spectrum has been normalized.
integrate_spct

Integrate spectral data.
is_photon_based

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

Miscellaneous Mathematical Functions
max

Wavelength maximum
normalize

Normalize spectral data
normalize_range_arg

Normalize a range argument into a true numeric range
irrad

Irradiance
oper_spectra

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

Normalization of an R object
mspct_classes

Names of multi-spectra classes
irradiance

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

Photon irradiance
photon_ratio

Photo:photon ratio
q_response

Photon-based photo-response
setBSWFUsed

Set the "bswf.used" attribute
q2e

Convert photon-based quantities into energy-based quantities
getScaled

Get the "scaled" attribute
interpolate_wl

Map spectra to new wavelength values.
getBSWFUsed

Get the "bswf.used" attribute
setGenericSpct

Convert an R object into a spectrum object.
get_peaks

Get peaks and valleys in a spectrum
getSpctVersion

Get the "spct.version" attribute
is.generic_mspct

Query class of spectrum objects
interpolate_spectrum

Calculate spectral values at a different set of wavelengths
is.solar_time

Query class
is.generic_spct

Query class of spectrum objects
resp_spct

Calculate response from spectral response
reflectance

Reflectance
is.old_spct

Query if an object has old class names
setNormalized

Set the "normalized" attribute
setMultipleWl

Set the "multiple.wl" attribute
split_irradiance

Energy or photon irradiance for split spectrum regions
setWhenMeasured

Set the "when.measured" attribute
setWhatMeasured

Set the "what.measured" attribute
subset2mspct

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

Photon irradiance for split spectrum regions
stepsize

Stepsize
print.waveband

Print a "waveband" object
peaks

Peaks or local maxima
print.summary_generic_spct

Print spectral summary
rbindspct

Row-bind spectra
reflectance_spct

Calculate reflectance from spectral reflectance
setWhereMeasured

Set the "where.measured" attribute
shared_member_class

Classes common to all collection members.
sun_angles

Solar angles
source_spct

Spectral-object constructor
spct_classes

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

Query whether a generic spectrum has been scaled
is_tagged

Query if it is an spectrum is tagged
is.waveband

Query if it is a waveband
interpolate_spct

Map a spectrum to new wavelength values.
integrate_xy

Gives irradiance from spectral irradiance.
min

Wavelength minimum
is.summary_generic_spct

Query class of spectrum summary objects
minus-.generic_spct

Arithmetic Operators
photobiology-package

Photobiological Calculations
photodiode.spct

Spectral response of a GaAsP photodiode
sun.spct

Solar spectral irradiance (simulated)
sun.daily.data

Daily solar spectral irradiance (simulated)
valleys

Valleys or local minima
T2A

Convert transmittance into absorbance.
v_insert_hinges

Insert wavelength values into spectral data.
trim_spct

Trim (or expand) head and/or tail
Trig

Trigonometric Functions
trim_wl

Trim head and/or tail of a spectrum
twilight2angle

twilight argument check and conversion
rgb_spct

RGB color values
response

Integrated response
print.solar_time

Print solar time and solar date objects
print

Print a spectral object
rmDerivedMspct

Remove "generic_mspct" and derived class attributes.
sign

Sign
rmDerivedSpct

Remove "generic_spct" and derived class attributes.
slash-.generic_spct

Arithmetic Operators
split_energy_irradiance

Energy irradiance for split spectrum regions
split_bands

List-of-wavebands constructor
transmittance

Transmittance
summary

Summary of a spectral object
summary_spct_classes

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

Calculate transmittance from spectral transmittance.
yellow_gel.spct

Transmittance spectrum of yellow theatrical gel.
merge.generic_spct

Merge two generic_spct objects
untag

Remove tags
tz_time_diff

Time difference between two time zones
q_irrad

Photon irradiance
midpoint

Central wavelength value
q_ratio

Photon:photon ratio
setInstrDesc

Set the "instr.desc" attribute
setRfrType

Set the "Rfr.type" attribute
setInstrSettings

Set the "instr.settings" attribute
solar_time

Local solar time
smooth_spct

Smooth a spectrum
setScaled

Set the "scaled" attribute
getTfrType

Get the "Tfr.type" attribute
getWhenMeasured

Get the "when.measured" attribute
getWhatMeasured

Get the "what.measured" attribute
getTimeUnit

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

Multi-spct transform methods
mod-.generic_spct

Arithmetic Operators
l_insert_hinges

Insert wavelength values into spectral data.
julian_day

Solar astronomy using Meeus' algorithm
prod_spectra

Multiply two spectra, even if the wavelengths values differ
plus-.generic_spct

Arithmetic Operators
photons_energy_ratio

Photon:energy ratio
qe_ratio

Photon:energy ratio
q_fluence

Photon fluence
range

Wavelength range
tag

Tag a spectrum
s_e_irrad2rgb

Spectrum to rgb color conversion
subt_spectra

Subtract two spectra
round

Rounding of Numbers
sum_spectra

Add two spectra
times-.generic_spct

Arithmetic Operators
sun.daily.spct

Daily solar spectral irradiance (simulated)
wb2tagged_spct

Create tagged spectrum from wavebands
sun.data

Solar spectral irradiance (simulated)
upgrade_spectra

Upgrade one or more spectral objects
upgrade_spct

Upgrade one spectral object
white_body.spct

Theoretical white body
waveband_ratio

Photon or energy ratio
setTimeUnit

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

Set the "Tfr.type" attribute
waveband

Waveband constructor method
split2mspct

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

Length of object in wavelength units
trim_tails

Trim (or expand) head and/or tail
trim_waveband

Trim (or expand) head and/or tail
w_length2rgb

Wavelength to rgb color conversion
w_length_range2rgb

Wavelength range to rgb color conversion
wb2rect_spct

Create tagged spectrum from wavebands
wb2spct

Create spectrum from wavebands