knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "NA"
)

Our objective is to convert an output spectrum from a Monte Carlo simulation using PENEPMA into a .msa spectrum for plotting in DTSA-II.

Load a spectrum

First we get our exemplar file.

spcPath <- system.file("extdata", "pe-spect-01.dat", package = "rEDS")
spcPath

Then we create the .msa file using the penepmaToMsa function. We will write it to our Desktop.

library(rEDS)

homDir <- Sys.getenv('HOME')
homDir <- gsub("\\\\", "/", homDir)
outFil <- sprintf("%s/%s", homDir, 'Desktop/Eagle-XG-glass-15kV.msa' ) 
outFil

penepma_to_msa(spcPath, outFil, 15.0, "Eagle-XG glass")


jrminter/rEDS documentation built on May 19, 2019, 11:54 p.m.