EBSDDetector#
- class de_ebsd.sim.EBSDDetector(shape=(480, 480), pattern_center=(0.5, 0.5, 0.5), sample_tilt=70.0, tilt=0.0, azimuthal=0.0, twist=0.0, px_size=1.0)[source]#
Bases:
objectAn EBSD detector with a fixed pattern center.
- Parameters:
- shape
(n_rows, n_cols) in pixels.
- pattern_center
Pattern center (PCx, PCy, PCz) in the Bruker convention.
- sample_tilt
Sample tilt in degrees (usually set from
Microscope.sample_tilt).- tilt
Detector tilt in degrees.
- azimuthal
Detector azimuthal angle in degrees.
- twist
Detector twist about its normal, in degrees.
- px_size
Effective screen pixel pitch in micrometers, including binning (not camera sensor pitch). Used for physical dimensions in the inspector; pattern projection itself only depends on the normalized PC.
Methods
Unit direction vectors (n_rows * n_cols, 3) in the sample frame.
Interactive screen placement and PC editor, also exportable to HTML.
Attributes
aspect_ratioazimuthalTop-left clockwise corners relative to the beam impact, in mm.
Detector bounds [x_min, x_max, y_min, y_max] in gnomonic coordinates.
ncolsnrowspattern_centerPerpendicular foot from impact to screen, in sample coordinates.
px_sizesample_tiltshapesizetilttwist- property corners_sample_mm#
Top-left clockwise corners relative to the beam impact, in mm.
Uses the same Bruker PC and frame transform as direction_cosines. Physical distances assume px_size is the effective screen pixel pitch (including binning), not the camera sensor’s pixel pitch.
- direction_cosines(device=None, dtype=torch.float32)[source]#
Unit direction vectors (n_rows * n_cols, 3) in the sample frame.
Row-major over the detector (row 0 = top). Port of kikuchipy
_get_direction_cosines_for_fixed_pc.
- property gnomonic_bounds#
Detector bounds [x_min, x_max, y_min, y_max] in gnomonic coordinates.
- property pattern_center_sample_mm#
Perpendicular foot from impact to screen, in sample coordinates.