lr_parse_trm {lightr}R Documentation

Parse Avantes binary file

Description

Parse Avantes binary file (TRM, ABS, ROH, DRK, REF, RAW8, RFL8 file extensions). https://www.avantes.com/products/spectrometers/

Usage

lr_parse_trm(filename)

lr_parse_abs(filename)

lr_parse_roh(filename)

lr_parse_rfl8(filename, specnum = 1L)

lr_parse_raw8(filename, specnum = 1L)

lr_parse_irr8(filename, specnum = 1L)

Arguments

filename

Path of the file to parse

specnum

Integer representing the position of the spectrum to read in the file. This option only makes sense for AvaSoft8 files and is ignored in the other cases.

Details

'processed' column computed by lightr with the function lr_compute_processed().

Value

A named list of two elements:

Examples

res_trm <- lr_parse_trm(
  system.file("testdata", "avantes_trans.TRM", package = "lightr")
)
head(res_trm$data)
res_trm$metadata

res_roh <- lr_parse_roh(
  system.file("testdata", "avantes_reflect.ROH", package = "lightr")
)
head(res_roh$data)
res_roh$metadata

# This parser has a unique `specnum` argument
res_rfl8_1 <- lr_parse_rfl8(
  system.file("testdata", "compare", "Avantes", "feather.RFL8", package = "lightr"),
  specnum = 1
)
head(res_rfl8_1$data)
res_rfl8_1$metadata

res_rfl8_2 <- lr_parse_rfl8(
  system.file("testdata", "compare", "Avantes", "feather.RFL8", package = "lightr"),
  specnum = 2
)
head(res_rfl8_2$data)
res_rfl8_2$metadata


[Package lightr version 1.7.1 Index]