magpie.pixels.pos2pix_cart1d
- magpie.pixels.pos2pix_cart1d(x, length, ngrid, origin=0.0)
X-coordinate to 1D pixel.
- Parameters
- xfloat or array
X-coordinate.
- lengthfloat
Length of the 1D grid.
- ngridint
The grid dimension.
- originfloat, optional
Minimum value along the grid.
- Returns
- pixIDint or array
The index of the pixel the points are located in.