to_pixel_coords#
- EBSDDetector.to_pixel_coords(coords: ndarray, pos: int | tuple | None = None) ndarray[source]#
Return the corresponding detector pixel coordinates for the given gnomonic coordinates.
- Parameters:
- coords
A 2D array of coordinates of any shape whereby the gnomonic coordinates (gy, gx) are stored in the last axis.
- pos
Sample position(s) (pattern(s)) to convert coordinates for:
If not given, coordinates are returned for each sample position
If an integer or a 1D tuple,
ndimmust be 1 and coordinates for that sample position is returnedIf a 2D tuple,
ndimmust be 2 and coordinates for each sample position is returned
- Returns:
coords_outArray with detector pixel coordinates (y, x) of a shape given by pos. The coordinates are in the last axis.
See also