CartesianGrid

class plasmapy.plasma.grids.CartesianGrid(*seeds, num=100, **kwargs)

Bases: plasmapy.plasma.grids.AbstractGrid

A uniformly spaced Cartesian grid.

Methods Summary

volume_averaged_interpolator(pos, *args[, …])

Interpolate values on the grid using a volume-averaged scheme with no higher-order weighting.

Methods Documentation

volume_averaged_interpolator(pos: Union[numpy.ndarray, astropy.units.quantity.Quantity], *args, persistent=False)

Interpolate values on the grid using a volume-averaged scheme with no higher-order weighting.

Parameters
  • pos (np.ndarray or u.Quantity array, shape (n,3)) – An array of positions in space, where the second dimension corresponds to the three dimensions of the grid. If an np.ndarray is provided, units will be assumed to match those of the grid.

  • *args (str) – Strings that correspond to DataArrays in the dataset

  • persistent (bool) – If true, the interpolator will assume the grid and its contents have not changed since the last interpolation. This substantially speeds up the interpolation when many interpolations are performed on the same grid in a loop. persistent overrides to False if the arguments list has changed since the last call.