corrct.alignment.centering
Volume centering classes.
@author: Nicola VIGANÒ, CEA-IRIG and ESRF - The European Synchrotron, Grenoble, France
Module Contents
Classes
Volume re-centering class. |
API
- class corrct.alignment.centering.RecenterVolume(proj_geom: corrct.models.ProjectionGeometry, angles_rad: Union[numpy.typing.NDArray, numpy.typing.ArrayLike], precision: int = 2)[source]
Volume re-centering class.
Initialization
Volume recentering class, that shifts the detector position, in order to meet a certain volume position.
Parameters
proj_geom : models.ProjectionGeometry The projection geometry. angles_rad : NDArray | ArrayLike The rotation angles to consider. precision : int, optional Number of decimals to use, by default 2.
- _apply_displacement_vu(shifts_vu: numpy.typing.NDArray, displacemenet_zyx: numpy.typing.NDArray) numpy.typing.NDArray [source]
- to_com(shifts_vu: Union[numpy.typing.ArrayLike, numpy.typing.NDArray], volume: numpy.typing.NDArray, com_ref_zyx: Union[numpy.typing.ArrayLike, numpy.typing.NDArray]) numpy.typing.NDArray [source]
Recenter to a given center-of-mass (CoM).
Parameters
shifts_vu : ArrayLike | NDArray The current VU shifts. volume : NDArray The volume to shift. com_ref_zyx : ArrayLike | NDArray The destination CoM.
Returns
NDArray The corrected VU shifts.
- as_reference(shifts_vu: numpy.typing.NDArray, volume: numpy.typing.NDArray, reference: numpy.typing.NDArray, method: str = 'com') numpy.typing.NDArray [source]
Recenter with respect to a given volume.
Parameters
shifts_vu : NDArray Current VU shifts. volume : NDArray The volume to shift. reference : NDArray The reference volume. method : str, optional The method to use out of “com” | “xc” (cross-correlation), by default “com”
Returns
NDArray The corrected VU shifts.
Raises
ValueError In case of wrong method.