knitr::opts_chunk$set( fig.asp = 2/3, collapse = TRUE, comment = "#>", fig.path = "man/figures/README-" )
Package photobiologyFilters is a collection of spectral transmittance data for more than 500 transparent and partially transparent materials measured in our lab, by collaborators and contributors including data have made available by the suppliers for inclusion in this package. The package also contains spectral reflectance data and spectral refraction index data for some materials and spectral reflectance data for some man-made and natural land surfaces.
In the update to version 0.5.0 several members of the collection of filter spectra were renamed to ensure consistency and clarity. As of version 0.5.0 all member names start with the name of the manufacturer or supplier. In addition, several of the vectors of names of member spectra were renamed to include the word "filters" to avoid possible name clashes with other packages and also to improve naming consistency. In version 0.5.3 the names of spectra for photography filters were revised again as data for several copies of the same filter types are now included in some cases.
library(photobiologyFilters)
How many spectra are included in the current version of 'photobiologyFilters'?
More than 300 spectra for optical glass and plastic sheets and films. This collection includes filters used for photography, the whole set of Schott glass filters, most of MIDOPT filters, various types of glass, acrylic, polycarbonate and other panes, and theatrical "gels" and some greenhouse cladding films. Most of these materials do not scatter light and all of them are homogeneous.
length(filters.mspct)
Nearly 200 spectra for different climate screens used in horticulture and agriculture. All these materials scatter light and have a heterogeneous surface, as they are nets, yarns or composites in which part of the surface has different transmittance than the matrix: either an opaque yarn with holes or a partly clear matrix with embedded opaque or partly opaque elements.
length(screens_nets.mspct)
Reflectance spectra for a few metals are included.
length(metals.mspct)
Reflectance spectra for different surfaces, such as bare ground, asphalt and different types of vegetation.
length(materials.mspct)
The refractive index can be used to derive other optical properties, such as reflectance at different angles of incidence. For some materials the refractive index varies strongly with wavelength while for other materials varies weakly. This is a small set, serving as example.
length(refractive_index.mspct)
What are the names of available spectra? We use head()
to limit the output.
# list names of the first 10 filters head(names(filters.mspct), 10)
To subset based on different criteria we can use predefined character vectors of filter or climate-screen names. For example, vector polyester
lists the names of the spectra for filters made of polyester (PET).
polyester_filters
We can use the vector to extract all these spectra as a collection.
filters.mspct[polyester_filters]
The package includes two character vectors with the names of the vectors of names that are available for filters and screens.
all_filter_selectors
all_screen_selectors
Please, see the User Guide or help pages for the names of other vectors of names for materials, suppliers, and regions of the spectrum.
Summary calculations can be easily done with methods from package 'photobiology'. Here we calculate mean transmittance for two regions of the spectrum given by wavelengths in nanometres.
transmittance(filters.mspct[["Foiltek_Clear_PET_G"]], list(waveband(c(250, 315)), waveband(c(500,600))))
The autoplot()
methods from package 'ggspectra' can be used for plotting one or more spectra at a time. The classes of the objects used to store the spectral data are derived from "data.frame"
making direct use of the data easy with functions and methods from base R and various packages.
Installation of the most recent stable version from CRAN:
install.packages("photobiologyFilters")
Installation of the current unstable version from R-Universe CRAN-like repository:
install.packages('photobiologyFilters', repos = c('https://aphalo.r-universe.dev', 'https://cloud.r-project.org'))
Installation of the current unstable version from GitHub (no binaries available):
# install.packages("remotes") remotes::install_github("aphalo/photobiologyfilters")
HTML documentation is available at (https://docs.r4photobiology.info/photobiologyFilters/), including a User Guide.
News on updates to the different packages of the 'r4photobiology' suite are regularly posted at (https://www.r4photobiology.info/).
Two articles introduce the basic ideas behind the design of the suite and its use: Aphalo P. J. (2015) (https://doi.org/10.19232/uv4pb.2015.1.14) and Aphalo P. J. (2016) (https://doi.org/10.19232/uv4pb.2016.1.15).
A book is under preparation, and the draft is currently available at (https://leanpub.com/r4photobiology/).
A handbook written before the suite was developed contains useful information on the quantification and manipulation of ultraviolet and visible radiation: Aphalo, P. J., Albert, A., Björn, L. O., McLeod, A. R., Robson, T. M., & Rosenqvist, E. (Eds.) (2012) Beyond the Visible: A handbook of best practice in plant UV photobiology (1st ed., p. xxx + 174). Helsinki: University of Helsinki, Department of Biosciences, Division of Plant Biology. ISBN 978-952-10-8363-1 (PDF), 978-952-10-8362-4 (paperback). PDF file available from (https://hdl.handle.net/10138/37558).
Pull requests, bug reports, and feature requests are welcome at (https://github.com/aphalo/photobiologyfilters).
If you use this package to produce scientific or commercial publications, please cite it according to the recommended citation below. For individual spectra please read the corresponding help page and if available, also cite the original source of the data. Be aware that most data have been re-processed before inclussion in the package.
citation("photobiologyFilters")
© 2012-2024 Pedro J. Aphalo (pedro.aphalo\@helsinki.fi). Released under the GPL, version 2 or greater. This software carries no warranty of any kind.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.