xrheed.conversion.base

Functions

convert_gx_gy_to_sx_sy(gx, gy, ewald_radius, ...)

Convert reciprocal lattice coordinates (gx, gy) to RHEED screen coordinates (sx, sy) using the Ewald sphere construction.

convert_sx_to_ky(x_coords_mm, ewald_radius, ...)

Convert sx coordinates from mm to ky [1/Å] using the Ewald sphere radius and screen-sample distance.

convert_gx_gy_to_sx_sy(gx, gy, ewald_radius, incident_angle, screen_sample_distance, remove_outside=True, **kwargs)[source]

Convert reciprocal lattice coordinates (gx, gy) to RHEED screen coordinates (sx, sy) using the Ewald sphere construction.

Parameters:
  • gx (NDArray) – Array of reciprocal lattice x-coordinates.

  • gy (NDArray) – Array of reciprocal lattice y-coordinates.

  • ewald_radius (float) – Radius of the Ewald sphere in reciprocal space (1/Å or same units as gx, gy).

  • incident_angle (float) – Incident beam angle in degrees relative to the surface normal.

  • screen_sample_distance (float) – Distance from the sample to the detector/screen.

  • remove_outside (Optional[bool], default=True) – If True, points outside the Ewald sphere are removed. If False, points outside are set to NaN.

  • **kwargs – Additional keyword arguments (currently unused).

Returns:

  • sx (NDArray) – Array of x-coordinates on the RHEED screen corresponding to input gx, gy.

  • sy (NDArray) – Array of y-coordinates on the RHEED screen corresponding to input gx, gy.

Notes

  • The function assumes a simple planar screen perpendicular to the z-axis.

  • The coordinate transformation accounts for the Ewald sphere geometry and the projection of diffraction spots onto the screen.

  • incident angle (beta) of the electron beam relative to the sample surface.

  • Points outside the Ewald sphere can be optionally removed or set as NaN using the remove_outside flag.

convert_sx_to_ky(x_coords_mm, ewald_radius, screen_sample_distance_mm)[source]

Convert sx coordinates from mm to ky [1/Å] using the Ewald sphere radius and screen-sample distance. :param x_coords_mm: Array of x coordinates in millimeters (mm). :type x_coords_mm: NDArray :param ewald_radius: Radius of the Ewald sphere in reciprocal space (1/Å). :type ewald_radius: float :param screen_sample_distance_mm: Distance from the sample to the screen in millimeters (mm). :type screen_sample_distance_mm: float

Returns:

Converted x coordinates in ky [1/Å].

Return type:

NDArray