nmrglue.convert
Functions to convert between NMR file formats
This modules is imported as nmrglue.convert and can be called as such.
High-Level Classes
These are the classes most users will use from the convert module.
-
class nmrglue.fileio.convert.converter
The converter object allowes conversion between NMR file formats
Example:
vdic,vdata = ng.varian.read("varian_dir")
C = ng.convert.converter()
C.from_varian(vdic,vdata)
pdic,pdata = C.to_pipe()
ng.pipe.write("test.fid",pdic,pdata)
-
from_bruker(dic, data, udic=None)
- Load data and dictionary from Bruker ser/fid file
-
from_pipe(dic, data, udic=None)
- Load data and dictionary from NMRPipe pair
-
from_sparky(dic, data, udic=None)
- Load data and dictionary from Sparky pair
-
from_universal(dic, data)
- load data from universal dic,data pair
-
from_varian(dic, data, udic=None)
load data and dictionary from varian fid pair
Parameter:
- dic Varian dictionary
- data Varian data
- udic Universal dictionary. If not provided is guessed.
-
to_bruker()
- Return Bruker dic,data pair
-
to_pipe(datetimeobj=datetime.datetime(2011, 4, 6, 16, 39, 24, 715461))
- Return NMRPipe dic,data pair
-
to_sparky(datetimeobj=datetime.datetime(2011, 4, 6, 16, 39, 24, 715465), user='user')
- Return sparky dic,data pair
-
to_universal()
- Return universal dictionary and original data
-
to_varian()
- Return Varian dic,data pair
Low-Level Classes
These classes are typically not used directly by users. They are used by
high level functions. Developers and user who want fine control over file
conversion will be interested in these functions.
-
class nmrglue.fileio.convert.udata_nd(edata, iproc, oproc, odtype, order=None)
Wrap other fileiobase.data_nd derived objects with input/output conversion
when slices are requested.
- slicing operations return ndarray objects.
- can iterate over with expected results.
- transpose and swapaxes methods create a new objects with correct axes
ordering.
- has ndim, shape, and dtype attributes.