read.spe: Import WinSpec SPE file

Description Usage Arguments Value Functions Author(s)

View source: R/read.spe.R

Description

Import function for WinSpec SPE files (file version 2.5). The calibration data (polynome and calibration data pairs) for x-axis are automatically read and applied to the spectra. Note that the y-calibration data structure is not extracted from the file since it is not saved there by WinSpec and is always empty.

Usage

1
2
3
4
5
6
7
read.spe(filename, xaxis = "file", acc2avg = F, cts_sec = F,
  keys.hdr2data = c("exposure_sec", "LaserWavelen", "accumulCount",
  "numFrames", "darkSubtracted"))

read.spe.header(filename)

spe.showcalpoints(filename, xaxis = "file", acc2avg = F, cts_sec = F)

Arguments

filename

Name of the SPE file to read data from

xaxis

Units of x-axis, e.g. "file", "px", "nm", "energy", "raman", ... read.spe function automatically checks if the x-calibration data are available and uses them (if possible) to reconstruct the xaxis in the selected units.

acc2avg

whether to divide the actual data set by the number of accumulations, thus transforming accumulated spectra to averaged spectra. WinSpec does not do this automatically, so the spectral intensity is always proportional to the number of accumulations. The flag @data$averaged is automatically set to TRUE.

cts_sec

whether to divide the actual data set by the exposure time, thus going to count per second unit.

keys.hdr2data

Which metadata from the file header should be saved to the Data slot of a newly created hyperSpec object

Value

hyperSpec object

hdr list with key=value pairs

Functions

Author(s)

R. Kiselev, C. Beleites


GegznaV/hyperSpec2 documentation built on Dec. 27, 2019, 9:43 a.m.