Skip to contents

Spectra are automatically grouped by wavenumbers in data_block, and a list is returned. The spectra must then be resampled/aligned to match a common set of wavenumbers before they can be combined.

Usage

opusreader2_to_hyperSpec(opusreader2_list, data_block = "ab", ...)

Arguments

opusreader2_list

A list_opusreader2.

data_block

(Default: "ab") Data block to use from the opus files. If you aren't sure which data blocks are available in your data set, use .getDataBlockNames().

...

Arguments passed on to hyperSpec::hyperSpec

gc

(logical)
Use garbage collection. If the option gc is set to TRUE, the initialization will have frequent calls to base::gc(), which can help avoid swapping or running out of memory. The default value of gc can be set via hy_set_options().

Value

A list of hyperSpec::hyperSpec-class objects.

Details

Some data will not be converted:

  • Spectra columns except the spc_column

  • Wavenumber columns except the wavelength_column

Examples

if (FALSE) {
  data("opusreader2_list")
  spectra <- opusreader2_to_hyperSpec(opusreader2_list)[[1]] |> str()
}