Grids¶
GridSpec¶
-
class
wtools.geostats.grids.
GridSpec
(**kwargs)[source]¶ Bases:
properties.base.base.HasProperties
- A
GridSpec
object provides the details of a single axis along a grid. - If you have a 3D grid then you will have 3
GridSpec
objects.
Required Properties:
- min (
Integer
): The minimum value along this dimension. The origin., an integer, Default: 0 - n (
Integer
): The number of components along this dimension., an integer - sz (
Integer
): The uniform cell size along this dimension., an integer, Default: 1
Optional Properties:
- nnodes (
Integer
): The number of grid nodes to consider on either side of the origin in the output map, an integer
-
min
¶ 0
Type: min ( Integer
)Type: The minimum value along this dimension. The origin., an integer, Default
- A
geoeas_to_np¶
-
wtools.geostats.grids.
geoeas_to_np
(datain, nx, ny=None, nz=None)[source]¶ Transform GeoEas array into np.ndarray to be treated like image. Function to transform a SINGLE GoeEas-formatted raster (datain) i.e., a single column, to a NumPy array that can be viewed using imshow (in 2D) or slice (in 3D).
Parameters: Returns: - If only nx given: 1D array.
If only nx and ny given: 2D array. If nx, ny, and nz given: 3D array.
Return type: np.ndarray
Note
In 3D, z increases upwards
References
- Originally implemented in MATLAB by:
- Phaedon Kyriakidis, Department of Geography, University of California Santa Barbara, May 2005
- Reimplemented into Python by:
- Bane Sullivan and Jonah Bartrand, Department of Geophysics, Colorado School of Mines, October 2018