Home
[badges]
Align astronomical images of point sources. Based on the astroalign
Python package.
Credit: Beroiz, M., Cabral, J. B., & Sanchez, B. (2020)
This package is still in the experimental stage. If you notice an issue, please feel free to let us know!
Installation
pkg> add Astroalign
Getting Started
img_aligned, params = align(img_to, img_from;
box_size,
ap_radius,
min_fwhm = box_size .÷ 5,
nsigma = 1,
f = Astroalign.PSF(),
)
See the accompanying Pluto.jl notebook for more.
Contributing
Issues and pull requests welcome.
API / Reference
Astroalign.align_frame
— Functionfunction align_frame(img_to, img_from;
[box_size],
[ap_radius],
[f],
[min_fwhm],
[nsigma],
)
Align img_from
onto img_to
. See below for keyword arguments currently available to control this process.
box_size
: The size of the grid cells (in pixels) used to extract candidate point sources to use for alignment. Defaults to a tenth of the greatest common denominator of the dimensions ofimg_to
. See Photometry.jl > Source Detection Algorithms for more.ap_radius
: The radius of the apertures (in pixel) to place around each point source. Defaults to 60% offirst(box_size)
. See Photometry.jl > Aperture Photometry for more.f
: The function to compute within each aperture. Defaults to a 2D Gaussian fitted to the aperture center. See the Source characterization section of the accompanying Pluto.jl notebook for more.min_fwhm
: The minimum FWHM (in pixels) that an extracted point source must have to be considered as a control point. Defaults to a fifth of the width of the first image. See PSFModels.jl > Fitting data for more.nsigma
: The number of standard deviations above the estimated background that a source must be to be considered as a control point. Defaults to 1. See Photometry.jl > Source Detection Algorithms for more.
Astroalign.get_sources
— Functionget_sources(img; box_size = nothing, nsigma = 1)
Extract candidate sources in img
according to Photometry.Detection.extract_sources
. By default, img
is first sigma clipped and then background subtracted before the candidate sources are extracted. box_size
is passed to Photometry.Background.estimate_background
, and nsigma
is passed to Photometry.Detection.extract_sources
. See the Photometry.jl documentation for more.
TODO: Pass more options to clipping, background estimating, and extraction methods in Photometry.jl.
Astroalign.triangle_invariants
— Functiontriangle_invariants(phot)
Returns all combinations ($C$) of three candidate point sources from the table of sources phot
returned by Photometry.Aperture.photometry
, and the computed invariant $\mathscr M$ for each according to Eq. 3 from Beroiz, M., Cabral, J. B., & Sanchez, B. (2020).
Astroalign.find_nearest
— Functionfind_nearest(C_to, ℳ_to, C_from, ℳ_from)
Return the closes pair of three points between the from
and to
frames in the invariant $\mathscr M$ space as computed by Astroalign.triangle_invariants
.