pingwyn.core.types.Grid

class pingwyn.core.types.Grid(arr, z=None, metadata={})

Bases: ndarray

A container for a 3D grid.

This class extends numpy.ndarray, meaning that the grid data can be accessed as if it were a numpy array. The metadata attribute houses additional information for the physical experiment that was performed.

A Grid object has a (X, Y, Z) shape, where X and Y are the spatial grid indices and Z is the channel / z-axis index. The values used for the z-axis are found in the ā€œzā€ attribute.

A curve on a grid can be converted to a Curve object in the following way (where i and j are integer indices):

>>> curve = pingwyn.Curve(np.array([grid.z, grid[i, j, :]]))
metadata

A dictionary containing relevant metadata, such as setpoints, channel name, units and referenced files.

Type:

dict

z

The points that make up the z-axis of the measurement. For instance, in an I(V) grid, this attribute houses the points of the V axis.

Type:

array_like

__init__(*args: Any, **kwargs: Any) None

Methods

Attributes

metadata

z