This R package is a collection of utility functions to work with objects
of the class hyperSpec
as defined by the package
{hyperSpec}. While it is
independent from the popular
{hyperSpec} package
(written by Claudia Beleites), {hyperSpec.utils}
intends to add some
convenient shortcuts for data analysis, some more conversion, import and
export functions, tools for interactive data exploration, as well as
some extended functionality (such as cosmic ray removal). The package
can be considered as work in progress and substantial (also backwards
incompatible) changes are to be expected.
You can install hyperSpec.utils from GitHub with:
# install.packages("remotes")
remotes::install_github("konradmayer/hyperSpec.utils")
Use the argument dependencies = TRUE
to also install suggested
dependencies, mainly needed for the function spcmap_explorer()
, as
well as individual plotting, import/export and conversion functions.
Multiple additional functions are currently planned and ideas are added
to the issues
section with an
label attached.
If you have more ideas for useful functions, please open an issue with appropriate tag, or, even better, open a pull request to propose your ideas on a possible implementation.
The package will get continuously extended and currently holds functions
write.txt.Witec.Graph()
or to JCAMP-DX with write_jdx()
,
experimental import of OPUS binary files with read_opus()
)als()
for MCR-ALS, nmf()
for
NMF, vca()
for VCA and ica()
for ICA)omp()
for the orthogonal matching
pursuit, and linear_combination()
for fitting linear combinations
of reference spectra)spcmap_explorer()
, which is
demonstrated below, and cubeview()
)crr()
for cosmic ray removal
as defined in and provided with this
publication by
Whitaker and Hayes 2018, a S4 method for diff()
or extending the
test functions of {hyperSpec}
by the simple is.hyperSpec()
and
is.hyperSpecMap()
for consistency with the respective {base}
functions, returning a logical value in all cases)spcmap2array()
to get an array of the spectral hypercube,
spcmap_dim()
, is_hyperSpecMap()
as well as most visualization
functions)minmax_normalization()
,
snv_normalization()
, vector_normalization()
,
area_normalization()
and band_normalization()
, for band
aggregation aggregate_wl()
resp. integration integrate_wl()
plotting with the viridis color scale plotmap_viridis()
)Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.