How to open an AIA/ANDI .cdf chromatogram or GC-MS file online

A .cdf file from a chromatography data system is an AIA or ANDI export: a vendor-neutral format that Empower, Chromeleon, LabSolutions, OpenLab and many other programs can write, so that data can be read by other software. Without one of those programs, or a script, it is hard to look at.

What is inside an AIA .cdf file

AIA (Analytical Instrument Association) files follow the ANDI standards, ASTM E1947 for chromatography and ASTM E2077 for mass spectrometry. They are netCDF files, a general scientific data container, with fixed variable names.

Not every .cdf file is AIA: netCDF is also used for weather, ocean and satellite data. Nagura Lab checks the contents, not the extension, and tells you when a netCDF file is not chromatography or mass spectrometry.

In your browser

  1. Open Nagura Lab and drop one or more .cdf files on the page, or use Open data and pick Files. You can mix them with .D folders, .dx and other supported files.
  2. A chromatogram is plotted against time in minutes, with the sample name and date in the run list. Detectors such as UV, FID, ELSD, CAD and RI are recognized from the file; otherwise the signal is shown without a detector label.
  3. For a GC-MS file, the chart shows the total ion chromatogram. Click a point in it to see the mass spectrum at that time, and click a peak in the spectrum to extract that ion's chromatogram.
  4. Tick several runs to overlay them (up to eight). Runs in different units are scaled to their own range so they stay comparable.
  5. Download CSV gives the plotted traces in columns; for GC-MS, Download spectra matrix gives every scan (one row per scan, one column per m/z). Download PNG gives the figure.

The file is decoded on your computer and never uploaded. For mass spectra, m/z values are grouped to whole masses for display.

Supported: netCDF classic files in all three versions (including 64-bit offset and CDF-5), the layouts written by common programs, and times stored in seconds, minutes or milliseconds.

Not supported: netCDF-4 files (HDF5 inside). They are recognized and refused with a message. If your program offers a choice of netCDF version when exporting, pick the classic one.

How to get an AIA file out of your software

Look for an export option named AIA, ANDI or netCDF in the export or convert menu of your chromatography data system. The wording differs per program and version, so check its documentation. Choose chromatography data for a chromatogram and mass spectrometry data for GC-MS.

In Python

SciPy reads netCDF classic files. This turns a chromatogram into a CSV, assuming times are given as a start time and a sampling interval in seconds (check raw_data_retention and retention_unit if your file differs):

import csv
from scipy.io import netcdf_file

nc = netcdf_file("run.cdf", mmap=False)
y = nc.variables["ordinate_values"][:]
t0 = nc.variables["actual_delay_time"].getValue()
dt = nc.variables["actual_sampling_interval"].getValue()
with open("run.csv", "w", newline="") as f:
    w = csv.writer(f)
    w.writerow(["time_s", "signal"])
    w.writerows((t0 + i * dt, v) for i, v in enumerate(y))

The chromConverter R package and OpenChrom also read AIA files; OpenChrom needs a desktop install.

What this does not replace