File Format Conversion in Peak® Spectroscopy Software

Most instrument companies save data from their instruments in undocumented propietary binary formats, with few if any options for exporting the data into universal, open formats. When such export is possible, it usually has to be done one file at a time because there is no provision for batch conversion of multiple files at the same time.

In addition, some instruments vendors file formats are multi-files. A multi-file is a single file containing more than one spectrum. Sometimes the individual spectra in a multi-file are the same data type, such as all the absorbance files collected in a day, and sometimes they contain different datatypes, such as the inteferogram, singlebeam and transmittance data for a single sample. These variations complicate the export of data. Fortunately, Peak® Spectroscopy Software can handle all these cases.

Batch File Conversion

Peak® has a Batch File Conversion Tool.

The Batch File Conversion tool

Files loaded into a window, or disk files, can be converted. The choices for 'Source of Data' are:

Pick files to batch convert formats

Files can be saved in various formats. See 'Output File Formats' below for more information.

File formats for saving data

Batch File Save

Batch File Save is different from Batch File Conversion because it only operates on files that are loaded into Peak®, and most importantly it allows flexible re-naming of the files.

From the File / Batch Save of Spectra menu, this dialog appears:

The Batch Save Dialog

The right side of the dialog controls the source of the data, where to save it, and what format to save it in. The options are much like those above in 'Batch File Conversion'

Source and Format choices for Batch Save

The left side of the dialog controls the naming of the saved files. It allows for flexible options to control the names of the destination files.

How to name files for Batch Save

Input File Formats

Files can be converted from any of the file types that Peak® can read.

Output File Formats

The formats that Peak® can write to are:
  • Thermo/Galactic (.spc) format. This is the format created and used by Galactic in its popular SpectraCalc, LabCalc and GRAMS programs. Despite its age (dating to about 1988) and limitations, it has become a defacto common file format in the industry and can be read by most infrared spectroscopy software. The format is well documented, and a Software Development Kit was available at https://ftirsearch.com/features/converters/spcfileformat.htm. Galactic released a free ActiveX component named gspciolib.dll for reading .spc files in your own programs. The dll was packaged with documentation and named 'SpcIO Library'. It seems these resources have disappeared from the internet after the Thermo acquisition of Galactic.
  • JCAMP-DX files (.dx, .jdx). This is the JCAMP Data eXchange format, which was created in the 1980s. Designed to be flexible and extensible, it is an ASCII format so it is human-readable. It includes some clever compression options because disk space was a scarce resource in the 1980s. Because the compression options make it unreadable, and limited disk storage space is no longer a problem, most JCAMP files that one encounters are uncompressed. This format is well documented, see Jcamp-dx.org, and is supported by many spectroscopy programs
  • ASCII. This is plain text including the format known as comma-separated-values (.csv). These are human readable tables of spectral values. The format is well-supported, and human-readable, but has many limitations. Most importantly, any supplemental 'header' information, such as memo fields, data types, audit trails, and so on, is not transmitted in this format.
  • Excel (.xls). This is the popular Microsoft Excel spreadsheet format. Excel is used by many scientists for data analysis. Peak® can write directly to this format.
  • Matlab (.mat). In the 1990's, Matlab became the default program for chemometrics development. Peak® can write directly to this format, making data interchange easy for the matlab user.
  • Python numpy (.npy). Python is very popular for data analysis. Peak® can read and write to this format.
  • Perkin-Elmer (.sp) file format. Support for this PE format allows data interchange with Perkin Elmer software packages.
  • Bruker OPUS (.0). Some OPUS quant packages will only allow import of files that are in OPUS format.

Multi-Files

Peak® can also combine multiple spectra into what are known as multi-files, which are single files that contain multiple, related, spectra. This ability is very useful for those who are developing chemometrics applications, because all of the needed data is packaged into one file. The 'Export to Multifile' tool in Peak® performs this action.