infer_dx_from_params#
- ptyrad.utils.physics.infer_dx_from_params(dx=None, dk=None, kMax=None, da=None, angleMax=None, RBF=None, n_alpha=None, conv_angle=None, wavelength=None, Npix=None)[source]#
Infer the real-space pixel size (dx) based on available unit-related parameters. Accepts keyword arguments directly, or a dictionary via infer_dx_from_params(**params).
- Parameters:
dx (Optional[float], optional) – Real space pixel size for object, probe, and scan position coordinates in unit of Ang (electron) or m (X-ray). This is used as the unified unit for calibration. Defaults to None.
dk (Optional[float], optional) – k-space pixel size for the measurments in unit of 1/Ang (electron) or 1/m (X-ray). Defaults to None.
kMax (Optional[float], optional) – Maximum collection angle in unit of 1/Ang for electron, or 1/m for X-ray. Defaults to None.
da (Optional[float], optional) – k-space pixel size for the measurments in unit of mrad. Defaults to None.
angleMax (Optional[float], optional) – Maximum collection angle in unit of mrad. Defaults to None.
RBF (Optional[float], optional) – Number of pixels within the bright field disk of the electron diffraction pattern. Defaults to None.
n_alpha (Optional[float], optional) – Collection angle in unit of convergence angles of the elctron probe (usually called “n-alpha”). Defaults to None.
conv_angle (Optional[float], optional) – Convergence angles of the electron probe. Unit: Ang. Defaults to None.
wavelength (Optional[float], optional) – Wavelength of the wave. Unit should be Ang (electron) or m (X-ray). Defaults to None.
Npix (Optional[int], optional) – Number of detector pixel. Defaults to None.
- Raises:
ValueError – if required parameters are missing or input is ambiguous
- Returns:
inferred dx (real-space pixel size)
- Return type:
float