This example shows how to use nmrglue to coadd a series of 2d NMRPipe files. All files matching the test*.fid pattern will be coadded into a file named coadded.fid.

#! /usr/bin/env python

import nmrglue as ng
import numpy as np
import glob

# create a list of files to coadd
flist = glob.glob("test*.fid")
flist.sort()

# initilize the new data

for f in flist:

# write out the file