derotation.plotting_hooks.for_derotation#
This module contains hooks for making plots while the derotation is running. The hooks are called at specific points in the derotation process, specifically when a line is added to the derotated image and when a frame is completed. Also, a maximum projection plot is generated at the end of the first rotation. They are useful for debugging purposes and for generating figures.
Functions
|
Hook for plotting the maximum projection of the derotated image stack after the first rotation and the current derotated image. |
|
Hook for plotting the derotated image and the current rotated line. |
- derotation.plotting_hooks.for_derotation.line_addition(derotated_filled_image, rotated_line, image_counter, line_counter, angle, original_image)[source]#
Hook for plotting the derotated image and the current rotated line.
- Parameters:
derotated_filled_image (np.ndarray) – The derotated image.
rotated_line (np.ndarray) – The rotated line.
image_counter (int) – The current frame number.
line_counter (int) – The current line number.
angle (float) – The rotation angle of the line
original_image (np.ndarray) – The original image from which the line was taken.
- derotation.plotting_hooks.for_derotation.image_completed(derotated_image_stack, image_counter, frame_of_interest=149)[source]#
Hook for plotting the maximum projection of the derotated image stack after the first rotation and the current derotated image.
- Parameters:
derotated_image_stack (np.ndarray) – The derotated image stack.
image_counter (int) – The current frame number.
frame_of_interest (int, optional) – A frame number for which the maximum projection will be saved by cumulating all the frames up to that frame. Suggestion: set it to the last frame of the first rotation.