pykonal.fields.Field3D¶
-
class
pykonal.fields.
Field3D
¶ Base class for representing generic 3D fields.
-
savez
(self, path)¶ Save the field to disk using numpy.savez.
- Parameters
path (str) – Path to output file.
- Returns
Returns True upon successful execution.
- Return type
bool
-
transform_coordinates
(self, coord_sys, origin)¶ Transform node coordinates to a new frame of reference.
- Parameters
coord_sys (str) – Coordinate system to transform to (“spherical”, or “Cartesian”)
origin (tuple(float, float, float)) – Coordinates of the origin of the new frame with respect to the old frame of reference.
- Returns
Node coordinates in new frame of reference.
- Return type
numpy.ndarray(shape=(N0,N1,N2,3), dtype=numpy.float)
-
coord_sys
¶ [Read only,
str
] Coordinate system of grid on which field data is represented {“Cartesian”, “spherical”}.
-
iax_isnull
¶ [Read only,
numpy.ndarray
(shape=(3,), dtype=numpy.bool)] Array of booleans indicating whether each axis is null. The axis with only one layer of nodes in 2D problems will be null.
-
iax_isperiodic
¶ [Read only,
numpy.ndarray
(shape=(3,), dtype=numpy.bool)] Array of booleans indicating whether each axis is periodic. In practice, only the azimuthal (\(\phi\)) axis in spherical coordinates will ever be periodic.
-
max_coords
¶ [Read only,
numpy.ndarray
(shape=(3,), dtype=numpy.float)] Array specifying the upper bound of each axis.
-
min_coords
¶ [Read/Write,
numpy.ndarray
(shape=(3,), dtype=numpy.float)] Array specifying the lower bound of each axis. This attribute must be initialized by the user.
-
node_intervals
¶ [Read/Write,
numpy.ndarray
(shape=(3,), dtype=numpy.float)] Array of node intervals along each axis. This attribute must be initialized by the user.
-
nodes
¶ [Read only,
numpy.ndarray
(shape=(N0,N1,N2,3), dtype=numpy.float)] Array specifying the grid-node coordinates.
-
norm
¶ [Read-only, numpy.ndarray(shape=(N0,N1,N2,3), dtype=numpy.float)] 4D array of scaling factors for gradient operator.
-
npts
¶ [Read/Write,
numpy.ndarray
(shape=(3,), dtype=numpy.int)] Array specifying the number of nodes along each axis. This attribute must be initialized by the user.
-
step_size
¶ [Read only,
float
] Step size used for ray tracing.
-