5.27. align¶
Aligns the FITS files with the given reference.
- FitsArray.align(self, reference: Fits | int = 0, output: str | None = None, max_control_points: int = 50, min_area: int = 5) Self¶
Aligns the FITS files with the given reference.
Parameters
referenceUnion[Fits, int], default=0The reference image or the index of the
Fitsobject in theFitsArrayto be aligned as aFitsobject.outputOptional[str]New path to save the files.
max_control_pointsint, default=50The maximum number of control point sources to find the transformation. See Astroalign documentation for details.
min_areaint, default=5Minimum number of connected pixels to be considered a source. See Astroalign documentation for details.
Returns
FitsArrayA
FitsArrayobject of aligned images.
5.27.1. Example:¶
from myraflib import FitsArray, Fits
import math
fa = FitsArray.sample()
fits = Fits.sample()
aligned_fa_1 = fa.align(fits)
aligned_fa_2 = fa.align(0)