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, ndim must be 1 and coordinates for that sample position is returned

  • If a 2D tuple, ndim must be 2 and coordinates for each sample position is returned

Returns:
coords_out

Array with detector pixel coordinates (y, x) of a shape given by pos. The coordinates are in the last axis.

Examples using EBSDDetector.to_pixel_coords#

Convert between detector coordinate formats

Convert between detector coordinate formats