Learn R Programming

⚠️There's a newer version (0.14.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

1,284

Version

0.9.14

License

GPL (>= 2)

Maintainer

Pedro J. Aphalo

Last Published

March 20th, 2017

Functions in photobiology (0.9.14)

as.generic_mspct

Collection-of-spectra copy-constructor
fscale

Rescale a spectrum using a summary function
fscale_spct

fscale a spectrum
isValidInstrSettings

Check the "instr.settings" attribute
interpolate_spectrum

Calculate spectral values at a different set of wavelengths
isValidInstrDesc

Check the "instr.desc" attribute
labels

Find labels from "waveband" object
log

Logarithms and Exponentials
peaks

Peaks or local maxima
photobiology-package

photobiology: Photobiological Calculations
^.generic_spct

Arithmetic Operators
rmDerivedMspct

Remove "generic_mspct" and derived class attributes.
stepsize

Stepsize
times-.generic_spct

Arithmetic Operators
calc_multipliers

Spectral weights
wb2rect_spct

Create tagged spectrum from wavebands
white_led.source_spct

White led bulb spectrum
white_led.raw_spct

White led bulb spectrum
q2e

Convert photon-based quantities into energy-based quantities
rgb_spct

RGB color values
q_fluence

Photon fluence
spread

Length of object in wavelength units
tag

Tag a spectrum
waveband_ratio

Photon or energy ratio
as.generic_spct

Spectral-object copy constructor
interpolate_wl

Map spectra to new wavelength values.
absorbance

Absorbance
absorbance_spct

Calculate absorbance from spectral absorbance.
as_tod

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

Average spectral data.
checkSpctVersion

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

Theoretical clear body
dim.generic_mspct

Dimensions of an Object
clear_photobio.cache

clear the spectral weights cache
checkMspctVersion

Check that the "mspct.version" attribute is set
div-.generic_spct

Arithmetic Operators
e_fluence

Energy fluence
e_irrad

Energy irradiance
getNormalized

Get the "normalized" attribute
getRfrType

Get the "Rfr.type" attribute
insert_spct_hinges

Insert new wavelength values into a spectrum
integrate_spct

Integrate spectral data.
D65.illuminant.spct

CIE D65 illuminant data
sun_angles

Solar angles
sun.spct

Solar spectral irradiance (simulated)
slash-.generic_spct

Arithmetic Operators
FEL.BN.9101.165

Data for typical calibration lamps
w_length_range2rgb

Wavelength range to rgb color conversion
trim_tails

Trim (or expand) head and/or tail
white_led.cps_spct

White led bulb spectrum
white_body.spct

Theoretical white body
is.summary_generic_spct

Query class of spectrum summary objects
is.waveband

Query if it is a waveband
max

Wavelength maximum
merge.generic_spct

Merge two generic_spct objects
opaque.spct

Theoretical spectrum of an opaque material
oper_spectra

Binary operation on two spectra, even if the wavelengths values differ
photodiode.spct

Spectral response of a GaAsP photodiode
photon_irradiance

Photon irradiance
q_response

Photon-based photo-response
reflectance_spct

Calculate reflectance from spectral reflectance
setInstrDesc

Set the "instr.desc" attribute
D2.UV586

Data for typical calibration lamps
reflectance

Reflectance
split_photon_irradiance

Photon irradiance for split spectrum regions
solar_time

Local solar time
D2.UV653

Data for typical calibration lamps
T2A

Convert transmittance into absorbance.
Trig

Trigonometric Functions
beesxyzCMF.spct

Honeybee xyz chromaticity colour matching function data
black_body.spct

Theoretical black body
check_spectrum

Sanity check of a spectrum.
check_w.length

Sanity check of wavelengths (internal function).
class_spct

Query which is the class of an spectrum
clean

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

Calculate (energy) irradiance from spectral irradiance
div_spectra

Divide two spectra, even if the wavelengths values differ
e2q

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

Energy:energy ratio
fshift

Shift the scale of a spectrum using a summary function
fshift_spct

fshift a spectrum
photons_energy_ratio

Photon:energy ratio
prod_spectra

Multiply two spectra, even if the wavelengths values differ
print.waveband

Print a "waveband" object
trim_wl

Trim head and/or tail of a spectrum
setGenericSpct

Convert an R object into a spectrum object.
transmittance

Transmittance
trim_waveband

Trim (or expand) head and/or tail
source_spct

Spectral-object constructor
split_irradiance

Energy or photon irradiance for split spectrum regions
yellow_gel.spct

Transmittance spectrum of yellow theatrical gel.
transmittance_spct

Calculate transmittance from spectral transmittance.
upgrade_spectra

Upgrade one or more spectral objects
v_insert_hinges

Insert wavelength values into spectral data.
setWhereMeasured

Set the "where.measured" attribute
sun.daily.data

Daily solar spectral irradiance (simulated)
sum_spectra

Add two 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
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
Extract_mspct

Extract or replace members of a collection of spectra
f_dispatcher_spct

Math function dispatcher for spectra
getMspctVersion

Get the "mspct.version" attribute
trimInstrDesc

Trim the "instr.desc" attribute
A.illuminant.spct

CIE A illuminant data
A2T

Convert absorbance into transmittance
as_quantum

Convert spectral energy irradiance into spectral photon irradiance
as_quantum_mol

Convert spectral energy irradiance into spectral photon irradiance
checkTimeUnit

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

Get the "multiple.wl" attribute
getWhatMeasured

Get the "what.measured" attribute
getWhenMeasured

Get the "when.measured" attribute
integrate_xy

Gives irradiance from spectral irradiance.
interpolate_spct

Map a spectrum to new wavelength values.
is_absorbance_based

Query if a spectrum contains absorbance or transmittance data
is_effective

Is an R object "effective"
msmsply

Multi-spct transform methods
mspct_classes

Names of multi-spectra classes
plus-.generic_spct

Arithmetic Operators
polyester.spct

Transmittance spectrum of clear polyester film
resp_spct

Calculate response from spectral response
response

Integrated response
setNormalized

Set the "normalized" attribute
setWhenMeasured

Set the "when.measured" attribute
setRfrType

Set the "Rfr.type" attribute
wb2tagged_spct

Create tagged spectrum from wavebands
split_energy_irradiance

Energy irradiance for split spectrum regions
w_length2rgb

Wavelength to rgb color conversion
upgrade_spct

Upgrade one spectral object
untag

Remove tags
sun.daily.spct

Daily solar spectral irradiance (simulated)
subt_spectra

Subtract two spectra
as.solar_date

Convert a solar_time object into solar_date object
ciev10.spct

Linear energy CIE 2008 luminous efficiency function 10 deg data
color

Color of an object
copy_attributes

Copy attributes from one R object to another
cps2irrad

Conversion from counts per second to physical quantities
Extract

Extract or replace parts of a spectrum
eq_ratio

Energy:photon ratio
s_e_irrad2rgb

Spectrum to rgb color conversion
setBSWFUsed

Set the "bswf.used" attribute
split_bands

List-of-wavebands constructor
setWhatMeasured

Set the "what.measured" attribute
absorptance_spct

Calculate absorptance from spectral absorptance.
getScaled

Get the "scaled" attribute
D2.UV654

Data for typical calibration lamps
fluence

Fluence
format.solar_time

Encode in a Common Format
getBSWFUsed

Get the "bswf.used" attribute
generic_mspct

Collection-of-spectra constructor
green_leaf.spct

Green birch leaf reflectance.
insert_hinges

Insert wavelength values into spectral data.
is.generic_mspct

Query class of spectrum objects
is.generic_spct

Query class of spectrum objects
julian_day

Solar astronomy using Meeus' algorithm
l_insert_hinges

Insert wavelength values into spectral data.
normalization

Normalization of an R object
normalize

Normalize spectral data
print.summary_generic_spct

Print spectral summary
print.solar_time

Print solar time and solar date objects
rbindspct

Row-bind spectra
range

Wavelength range
rmDerivedSpct

Remove "generic_spct" and derived class attributes.
find_peaks

Find peaks in a spectrum
filter_cps.mspct

Counts per second from a measurement of a plastic film
getSpctVersion

Get the "spct.version" attribute
setInstrSettings

Set the "instr.settings" attribute
setMultipleWl

Set the "multiple.wl" attribute
shared_member_class

Classes common to all collection members.
sign

Sign
tz_time_diff

Time difference between two time zones
sun.data

Solar spectral irradiance (simulated)
twilight2angle

twilight argument check and conversion
summary_spct_classes

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

Summary of a spectral object
trimInstrSettings

Trim the "instr.settings" attribute
wb2spct

Create spectrum from wavebands
getInstrSettings

Get the "instr.settings" attribute
photon_ratio

Photo:photon ratio
getInstrDesc

Get the "instr.desc" attribute
get_peaks

Get peaks and valleys in a spectrum
irradiance

Photon (quantum) irradiance from spectral (energy) irradiance.
minus-.generic_spct

Arithmetic Operators
mod-.generic_spct

Arithmetic Operators
e_ratio

Energy:energy ratio
convolve_each

Convolve function for collections of spectra
convertTimeUnit

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

Query class
is.old_spct

Query if an object has old class names
normalized_diff_ind

Calculate a normalized index.
irrad

Irradiance
is_scaled

Query whether a generic spectrum has been scaled
is_tagged

Query if it is an spectrum is tagged
midpoint

Central wavelength value
min

Wavelength minimum
q_ratio

Photon:photon ratio
q_irrad

Photon irradiance
split2mspct

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

Energy-based photo-response
trim_spct

Trim (or expand) head and/or tail
spct_classes

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

Linear energy CIE 2008 luminous efficiency function 2 deg data
subset2mspct

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

Clip head and/or tail of a spectrum
valleys

Valleys or local minima
smooth_spct

Smooth a spectrum
c.generic_mspct

Combine collections of spectra
print

Print a spectral object
normalize_range_arg

Normalize a range argument into a true numeric range
absorptance

Absorptance
calc_source_output

Light-source spectral output
ccd.spct

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

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

CIE xyz chromaticity coordinates 2 deg data
waveband

Waveband constructor method
is_normalized

Query whether a generic spectrum has been normalized.
is_photon_based

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

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

Set the "scaled" attribute