I'm not sure the MSA format
requires equally spaced data. The file sizes are smaller when one enters the offset and ev (or keV) per channel and then a list of intensities, but the standard permits export of X,Y pairs. Note that the description from the original specification (1991):
In the case of spectra with equally-spaced x-values (equal increments
per channel), up to #NCOLUMNS y-values may be given per line. For Y-axis
datatype 1 < #NCOLUMNS < 5. Each y-value is either a real number
(containing a decimal point, even if there is no fractional component)
or is expressed in exponential form (e.g. 3.142E+3), and is followed
immediately by a comma. The corresponding x-values can be obtained from
the specified values of #XPERCHAN and #OFFSET or #CHOFFSET.
If the user prefers, data may be stored as (x,y) pairs of data points,
at #NCOLUMNS per line. For XY-axis datatype < #NCOLUMNS < 3. The x-
and y-values are expressed as real numbers or in exponential format, and
are separated with a comma. The (x,y) pairs themselves are separated by
a comma followed by at least one blank space.
One can (and I have) implement a two column export when needed.
I am in the middle of developing a package for R that will process data from PENEPMA simulations. It is under version control and I plan to implement unit tests. I am comparing to DTSA-II, so I have written functions that generate .msa files from the output of penepma. I am using a single column format for that because the data supports it. I would appreciate receiving one or two output files from PFE that I could try a two column output and see what problems arise from the irregularly spaced data. I downloaded Ben's examples (pre tidyverse) and could always try to interpolate if that is the best way to go. I have used LOESS algorithms to interpolate in the past with some success. I'll see what I can do if you send them...
Best regards,
John