Apertures
All apertures will rely on a position and the shape parameters.
aperture = Aperture(x0, y0, shape_params...)
The position can be pixels or sky coordinates. The sky coordinate positions utilize SkyCoords.jl and WCS.jl for conversion.
Sky coordinates are not supported yet.
See Pixel Convention - The origin is the bottom-left with (1, 1)
being the center of the pixel.
Circular Apertures
These apertures are parametrized by radius.
Photometry.Aperture.CircularAperture
— TypeCircularAperture(x, y, r)
CircularAperture([x, y], r)
A circular aperture.
A circular aperture with radius r
. r
must be greater than or equal to 0.
Examples
julia> ap = CircularAperture(0, 0, 10)
CircularAperture(0, 0, r=10)
Photometry.Aperture.CircularAnnulus
— TypeCircularAnnulus(x, y, r_in, r_out)
CircularAnnulus([x, y], r_in, r_out)
A circular annulus with inner radius r_in
and outer radius r_out
. 0 ≤ r_in
≤ r_out
.
Examples
julia> ap = CircularAnnulus(0, 0, 5, 10)
CircularAnnulus(0, 0, r_in=5, r_out=10)
Elliptical Apertures
These apertures are parametrized by the semi-major axis a
, semi-minor axis b
and position angle in degrees counter-clockwise from the positive x-axis θ
Photometry.Aperture.EllipticalAperture
— TypeEllipticalAperture(x, y, a, b, θ)
EllipticalAperture([x, y], a, b, θ)
An elliptical aperture with semi-major axis a
, semi-minor axis b
, and position angle θ
. a
and b
must be ≥ 0, θ
is measured in degrees counter-clockwise the standard x-axis.
Examples
julia> ap = EllipticalAperture(0, 0, 4, 2, 35)
EllipticalAperture(0, 0, a=4, b=2, θ=35°)
Photometry.Aperture.EllipticalAnnulus
— TypeEllipticalAnnulus(x, y, a_in, a_out, b_out, θ)
EllipticalAnnulus([x, y], a_in, a_out, b_out, θ)
An elliptical annulus with inner semi-major axis a_in
, outer semi-major axis a_out
, outer semi-minor axis b_out
, and position angle θ
. a_out
≥ a_in
≥ 0 and b_out
must be ≥ 0, θ
is measured in degrees counter-clockwise the standard x-axis.
b_in
will automatically be calculated from (a_in / a_out) * b_out
. Note this may cause a type instability.
Examples
julia> ap = EllipticalAnnulus(0, 0, 4, 10, 5, 45)
EllipticalAnnulus(0.0, 0.0, a_in=4.0, a_out=10.0, b_in=2.0, b_out=5.0, θ=45.0°)
Rectangular Apertures
These apertures are parametrized by side-length a
, side-length b
, and position angle in degrees counter-clockwise from the positive x-axis θ
.
API/Reference
Photometry.Aperture.AbstractAperture
— TypeThe abstract super-type for Apertures
Photometry.Aperture.mask
— Functionmask(::AbstractAperture; method=:exact)
Return an array of the weighting of the aperture in the minimum bounding box. For an explanation of the different methods, see aperture_photometry
.
Photometry.Aperture.cutout
— Functioncutout(::AbstractAperture, data)
Get the cutout of the aperture from the data
. This will handle partial overlap by padding the data with zeros.