nmrglue.fileiobase
fileiobase provides general purpose NMR file IO functions and classes
used by multiple nmrglue.fileio modules
This modules is imported as nmrglue.fileiobase and can be called as such.
Low-Level Functions
These functions are typically not used directly by users. They are called by
high level functions.
-
nmrglue.fileio.fileiobase.create_blank_udic(ndim)
- Create a blank universal dictionary for a ndim-D spectrum
-
nmrglue.fileio.fileiobase.open_towrite(filename, overwrite=False)
Open filename for writing and return file object
Function checks if file exists (and raises IOError if overwrite=False) and
creates necessary directiories as needed.
-
nmrglue.fileio.fileiobase.ndfrom_iter(shape, slices)
-
nmrglue.fileio.fileiobase.ndto_iter(shape, slices)
-
nmrglue.fileio.fileiobase.ndtofrom_iter(shape, slices)
-
nmrglue.fileio.fileiobase.size_and_ndtofrom_iter(shape, slices)
-
nmrglue.fileio.fileiobase.index2trace_flat(shape, index)
- Calculate trace number from shape and index of all indirect dimensions
assuming a flat structure
-
nmrglue.fileio.fileiobase.trace2index_flat(shape, ntrace)
- Calculate the index of a trace assuming a flat structure
-
nmrglue.fileio.fileiobase.index2trace_opp(shape, index)
- Calculate trace number from shape and index of all indirect dimensions
assuming a phase ordering opposite the time increments.
-
nmrglue.fileio.fileiobase.trace2index_opp(shape, ntrace)
- Calculate the index of a trace assuming opposite phase/time increment
ordering
-
nmrglue.fileio.fileiobase.index2trace_reg(shape, index)
- Calculate trace number from shape and index of all indirect dimensions
assuming the same phase and time ordering.
-
nmrglue.fileio.fileiobase.trace2index_reg(shape, ntrace)
- Calculate the index of a trace assuming the same phase/time increment
ordering
Low-Level Classes
These classes are typically not used directly by users. They are extended or
called by high level classes or functions.
-
class nmrglue.fileio.fileiobase.unit_conversion(size, cplx, sw, obs, car)
- object provides methods to convert between common nmr units
-
class nmrglue.fileio.fileiobase.data_nd(order)
data_nd emulates numpy.ndarray object without loading data into memory
- slicing operations return ndarray objects
- can iterate over with expected results
- transpose and swapaxes functions create a new data_nd object with the
new axes ordering
- has ndim, shape, and dtype attributes.