How to open an Agilent ChemStation .MS file (GC-MS) and view the mass spectra

A GC-MS or single-quadrupole LC-MS run in ChemStation stores its mass spectra in data.ms (or MSD1.MS) inside the .D folder. Without MSD ChemStation you cannot open it directly, but the file can be decoded elsewhere.

What the file contains

One scan per time point. Each scan is a list of m/z and abundance pairs. The m/z values are stored in steps of 0.05 Da; for unit-resolution quadrupole data they are grouped to whole masses for display. SIM runs store only the ions that were monitored.

In your browser

  1. Open Nagura Lab and drop the .D folder, or the .ms file on its own.
  2. The main chart shows the total ion chromatogram (TIC): the summed abundance of all ions in each scan.
  3. Click Explore spectra next to the .ms file in the list (it opens by itself when it is the only multi-channel file). Then click a peak in the chromatogram to see the mass spectrum at that time.
  4. Type an m/z and a window (for example 57 ± 0.5) and press Add chromatogram to get the extracted ion chromatogram (XIC). Add several to compare ions.
  5. Export the plotted chromatograms with Download CSV, or every scan with Download spectra matrix (one row per scan, one column per m/z).

Nothing is uploaded; the file is decoded on your computer.

In Python

import rainbow as rb

ms = rb.read("sample.D").get_file("data.ms")
tic = ms.data.sum(axis=1)          # total ion chromatogram
xic = ms.extract_traces(57)[0]     # extracted ion chromatogram, m/z 57
times, mz = ms.xlabels, ms.ylabels # minutes, m/z

What this does not replace