File I/O¶
This modules holds all of the neccesarry functions and classes for reading
NUFT input data into the classes described in spec
.
NuftMesh¶
-
class
nuftio.fileio.
NuftMesh
(h=None, x0=None, **kwargs)[source]¶ Bases:
discretize.TensorMesh.TensorMesh
- This is an extension of
discretize``s ``TensorMesh
to provide - file IO for NUFT simulation results
Required Properties:
- h (a list of
Array
): h is a list containing the cell widths of the tensor mesh in each dimension., a list (each item is a list or numpy array of <class ‘float’> with shape (*)) with length between 0 and 3 - x0 (
Array
): origin of the mesh (dim, ), a list or numpy array of <class ‘float’> with shape (*)
- This is an extension of
Parser¶
-
class
nuftio.fileio.
Parser
(**kwargs)[source]¶ Bases:
properties.base.base.HasProperties
Parses NUFT data files
-
COMMENTS
= ';'¶
-
static
parseFile
(filename, comments=';', skiprows=0, opener='(', closer=')')[source]¶ Parses general NUFT data file into a disctionary. If it is a table then use the
parseTabFile
method.
-