Object which allows for graceful iteration over 3D NMRPipe files.
iter3D.iter() returns a (dic,plane) tuple which can be written using the x.writeplane function.
When processing 3D files with iter3D object(s) the following dictionary parameters may not have the same values as NMRPipe processing scripts return:
Example:
#3D data processing
xiter = iter3D("data/test%03d.fid","x","x")
for dic,YXplane in xiter:
# process X and Y axis
xiter.write("ft/test%03d.ft2",YXplane,dic)
ziter = iter3D("ft/test%03d.ft2","z","z")
for dic,XZplane in ziter:
# process Z axis
ziter.write("ft/test%03d.ft3",XZplane,dic)
Create a iter3D object
| Parameters : | filemask : str
in_lead : (‘x’, ‘y’, ‘z’), optional
out_lead : (‘x’, ‘y’, ‘z’, ‘DEFAULT’), optional
|
|---|
Notes
| In-lead | Iterated Planes |
|---|---|
| “x” | (‘y’,’x’) |
| “y” | (‘x’,’y’) |
| “z” | (‘x’,’z’) |
Methods
| __init__(filemask[, in_lead, out_lead]) | Create a iter3D object |
| next() | Return the next dic, plane or raise StopIteration |
| reinitialize() | Restart iterator at first dic,plane. |
| write(filemask, plane, dic) | Write out current plane. |