pykonal.fields

This module provides three classes (Field3D, ScalarField3D, and VectorField3D). Field3D is a base class intended to be used only as an abstraction. ScalarField3D and VectorField3D both inherit from Field3D and add important functionality that make the classes useful. They are primarily intended for storing and interpolating data, and, in the case of scalar fields, computing the gradient.

This module also provides an I/O function (read_hdf) to read data that was saved using the to_hdf method of the above classes.

pykonal.fields.load(path)

Deprecated since version 0.3.2: Use read_hdf() instead.

Load field data from disk.

Parameters

path (str) – Path to input file.

Returns

A Field3D-derivative class initialized with data in path.

Return type

ScalarField3D or VectorField3D

pykonal.fields.read_hdf(path)

Load field data from HDF5 file on disk.

Parameters
  • path (str) – Path to input file.

  • min_coords (numpy.ndarray(shape=(3,), dtype=numpy.float), optional) – Minimum bounding coordinates to read. This is for reading a limited portion of the file and should be given in the same coordinates as self.coord_sys.

  • max_coords (numpy.ndarray(shape=(3,), dtype=numpy.float), optional) – Maximum bounding coordinates to read. This is for reading a limited portion of the file and should be given in the same coordinates as self.coord_sys.

Returns

A Field3D-derivative class initialized with data in path.

Return type

ScalarField3D or VectorField3D