OpticalFit Manual 18.06 Table of contents Loading and saving spectra « Last page Next page »

Supported file formats

The list of spectrum file formats currently supported by OpticalFit includes:

Users should also be aware that OpticalFit has certain general requirements for spectrum files that apply to all file types, and also preserves data precision differently when exporting some file formats.

EMSA/MAS spectrum file (.emsa)

The principal file format used by OpticalFit for loading or saving spectra, and for exchanging spectrum data with other software, is the EMSA/MAS Standard File Format for Spectral Data Exchange (.emsa), which is formally standardised as ISO 22029.

Furthermore, with regards to the EMSA/MAS spectrum format, OpticalFit:

Please click here for an example EMSA file.

Please also refer to the list of general requirements for spectrum file formats.

Comma separated value files (.csv)

The CSV text files are required to be formatted in two columns; the first contains the wavelength/energy coordinates, and the second contains the intensity values. The first row of each column should contain the unit label. No other header or comment information is permitted in these text files. All values or labels must be followed by a comma, unless they are the last value on a line, in which case it is permissible to omit the trailing comma before the newline character. Each line must be terminated with a newline character, except for the last line, which may simply terminate with the end of file. Carriage returns may be included, but are always ignored, and are not taken to delimit the end of line. Spaces may be included before or after values, but other whitespace characters are not permitted.

Please click here for an example CSV file.

Please also refer to the list of general requirements for spectrum file formats.

Tab-delimited text files (.tab, .txt)

The requirements for tab-delimited text files (either .tab or .txt) are identical to those of the comma separated value files described above, except that the delimiting character is a single horizontal tab, instead of a comma, and commas are otherwise not permitted in tab/txt files.

Please click here for an example tab-delimited file.

Please also refer to the list of general requirements for spectrum file formats.

OpticalFit document (.ofd)

The OpticalFit document format (.ofd) is a proprietary binary file format used by OpticalFit to store the program state, including all spectra currently loaded, the current peak table, and display settings. This file format is intended only to allow users to conveniently work of spectra using OpticalFit, as it prevents the accidental loss or mix-up of peak tables &c.

Some software (e.g. xCLent Image) may be able to load spectrum and/or peak table data directly from OFD files. However, the OFD format is not generally intended for data exchange with third-party software, is presently and forevermore undocumented, and is subject to change between versions without notice or explanation (though OpticalFit will retain compatibility with older file versions). Users wishing to exchange OpticalFit data with other software are encouraged to export their spectra in the EMSA/MAS spectrum data file format (.emsa) for the spectrum data, and the comma separated value format (.csv) for the peak table. Users may use OpticalFit to convert OFD files into EMSA, CSV or TAB/TXT files at any time.

General requirements for spectrum files

Regardless of format, there are certain requirements for spectrum files to be loaded into OpticalFit.

X-axis is monotonic

OpticalFit requires that the x-axis values are monotonic, such that the energy/wavelength per channel is either always increasing, or always decreasing, as a function of channel index. OpticalFit does not require that the steps in x-axis values from one channel to the next to be equal, however, as non-linear and non-contiguous channel steps are supported.

Units

OpticalFit does not restrict the values of the x- or y-axis units, so any spectrum data in arbitrary units may be loaded in OpticalFit (microsieverts per smoot-pound is supported, for example). However, the following wavelength/energy unit labels are specially recognised by OpticalFit and may be transformed from one to another using the x-axis options menu:

Likewise, OpticalFit recognises the following y-axis unit labels, which may be transformed into, for example, “Counts/s” or “Counts/s/nA” using the y-axis options menu, assuming the required spectrum metadata is known:

Data preservation

CSV / TXT

Spectra exported from OpticalFit as CSV or TAB/TXT files will be exported exactly as presented in the spectrum plot, using the selected x- and y-axis units, as well as normalisation and smoothing settings. These file formats are typically used to exchange spectrum data with generic software such as spreadsheets, which may not have the immediate capability to appropriately transform x- and y-axis units in spectra, or apply appropriate smoothing or normalisation. Hence, to allow users of such software to make use the spectrum transform options in OpticalFit as part of their data-processing pipeline, spectra exported as CSV/TXT/TAB preserve the as-displayed spectrum data from OpticalFit.

EMSA

In contrast to the case with CSV / TXT files, spectra exported from OpticalFit in the EMSA file format will be stored in their original as-measured form. Thus, the spectra will be saved using their original intensity and energy/wavelength units, regardless of the current display units in OpticalFit, and will also not include any smoothing or normalisation that may be applied in the OpticalFit display. It is expected that third-party spectrum-aware software that can load EMSA files will be capable of performing any such required data transforms, and may benefit from the retention of the counting statistics present in the original data.

OFD

OpticalFit document files (.ofd) are handled like EMSA files in that they store the original as-loaded spectrum data to prevent loss of precision, but also store the current display options (axis units, normalisation, smoothing, etc.), so that when an OFD file is loaded in OpticalFit, the spectrum will be displayed exactly as it was when it was last saved, even though the underlying un-processed data is retained and can be recovered by changing the appropriate display settings.

© Copyright 2008-2018 CSIRO. All rights reserved.