R/spe_plot_calibration_points.R
spe_plot_calibration_points.Rd
Plot the WinSpec SPE file (version 2.5) and show the calibration points stored inside of it (x-axis calibration).
spe_plot_calibration_points(
file,
wl_units = NULL,
acc2avg = FALSE,
cts_sec = FALSE,
xaxis = "DEPRECATED"
)
(character): Name of the SPE file to read data from.
(character|NULL
): Units of x-axis, e.g., "px"
, "nm"
,
"energy"
, "raman"
, ...
. NULL
means default units defined in
a file.
Function read_spe()
automatically checks if the x-calibration data are
available and uses them (if possible) to reconstruct the wavelength axis
in the selected units.
(logical): 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
.
(logical): Whether to divide the actual data set by the exposure time, thus going to count per second unit.
(DEPRECATED): use wl_units
instead.
suppressPackageStartupMessages({
library(hySpc.read.spe)
})
# Example 1
blut1 <- system.file("extdata", "blut1.SPE", package = "hySpc.read.spe")
spe_plot_calibration_points(blut1)
# Example 2: expect warnings as calibration data is not present.
spe3 <- system.file(
"extdata", "spe_format_3.0.SPE",
package = "hySpc.read.spe"
)
spe_plot_calibration_points(spe3)
#> Warning: Cannot show calibration data in pixels
#> Warning: No calibration data! Nothing to show