magpie.pixels.pos2pix_cart3d

magpie.pixels.pos2pix_cart3d(x, y, z, lengths, ngrids, origin=[0.0, 0.0, 0.0])

X, Y and Z-coordinate to 3D pixel.

Parameters
x, y, zfloat or array

X, Y and Z-coordinate.

lengthsfloat or list[float]

Lengths of the 3D grids.

ngridsint or list[int]

The grid dimension.

originlist[float], optional

Minimum value along the grids.

Returns
pixIDint or array

The index of the pixel the points are located in 3D.