magpie.pixels.pix2pos_cart2d
- magpie.pixels.pix2pos_cart2d(pixID, lengths, ngrids, origin=[0.0, 0.0], return1d_pixID=False)
Returns the 2D pixel coordinate from a pixel index.
- Parameters
- pixIDint or array
2D pixel index.
- lengthsfloat or list[float]
Length of the grid.
- ngridsint or list[int]
Number of grid points.
- originlist[float], optional
Minimum values of the grid along each axis.
- return1d_pixIDbool, optional
Returns 1d pixel index.
- Returns
- x, yfloat or array
Mid-point of the pixel points.
- dx, dyfloat
Pixel width.
- xpixID, ypixIDint or array
1D pixel index.