Seperated interleaved example

Introduction

This example is taken from Listing S5 in the 2013 JBNMR nmrglue paper. In this example a pseudo-3D NMRPipe data set is seperated into 2D data sets using the script seperate.py.

Instructions

Execute python seperate.py to seperate the pseudo-3D data set into 2D data sets. Six directories with names techo_XXXX.fid will be created.

The data used in this example is available for download.

Listing S5

[seperate.py]

import nmrglue as ng

# read in the NMR data
dic, data = ng.varian.read('arrayed_data.fid')

# set the new size of the separated data
dic['nblocks'] = data.shape[0]

# loop over the echo times, separating and saving each 2D
for i, techo in enumerate(dic['procpar']['techo']['values']):
    dir_name = 'techo_' + techo + '.fid'
    print "Creating directory:", dir_name
    ng.varian.write(dir_name, dic, data[:, i, :], overwrite=True)

Table Of Contents

Previous topic

2D visualization example

Next topic

Seperated inner phase example

This Page