httomolibgpu.prep.alignment
#
Modules for data correction
- httomolibgpu.prep.alignment.distortion_correction_proj_discorpy(data: <cp.ndarray>, metadata_path: str, shift_xy: typing.List[int] = [0, 0], step_xy: typing.List[int] = [1, 1], order: int = 3, mode: str = 'constant')[source]#
Unwarp a stack of images using a backward model. See [8].
- Parameters
data (cp.ndarray) – 3D array.
metadata_path (str) – The path to the file containing the distortion coefficients for the data.
shift_xy (List[int]) – Centers of distortion in x (from the left of the image) and y directions (from the top of the image).
step_xy (List[int]) – Steps in x and y directions respectively. They need to be not larger than one.
order (int, optional) – The order of the spline interpolation, default is 3. Must be in the range 0-5.
mode (str, optional) – Points outside the boundaries of the input are filled according to the given mode (‘constant’, ‘nearest’, ‘mirror’, ‘reflect’, ‘wrap’, ‘grid-mirror’, ‘grid-wrap’, ‘grid-constant’ or ‘opencv’).
- Returns
3D array. Distortion-corrected array.
- Return type
cp.ndarray