4.20. align¶
Aligns the fits file with the given reference image.
- Fits.align(reference: Self, output=None, max_control_points=50, min_area=5, override=False) Self¶
Aligns the fits file with the given reference image.
Notes
This method aligns the current
Fitsobject with the specified reference image using control points.Parameters
referenceSelfThe reference image to which the current
Fitsobject will be aligned.outputOptional[str], optionalPath to save the new aligned fits file.
max_control_pointsint, optional, default=50The maximum number of control point sources to find the transformation.
min_areaint, optional, default=5Minimum number of connected pixels to be considered a source.
overridebool, optional, default=FalseIf
True, will overwrite theoutputpath if a file already exists.
Returns
FitsA
Fitsobject of the aligned image.
4.20.1. Example:¶
from myraflib import Fits
fits = Fits.sample()
reference = Fits.sample().shift(10, 10)
aligned = fits.align(reference)