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(position, 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(position, 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(position, 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(position, 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 width w
, height h
, and position angle in degrees counter-clockwise from the positive x-axis θ
.
Photometry.Aperture.RectangularAperture
— TypeRectangularAperture(x, y, w, h, θ)
RectangularAperture(position, w, h, θ)
A rectangular aperture.
A rectangular aperture with width w
, height h
, and position angle θ
in degrees.
Examples
julia> ap = RectangularAperture(0, 0, 10, 4, 0)
RectangularAperture(0, 0, w=10, h=4, θ=0°)
Photometry.Aperture.RectangularAnnulus
— TypeRectangularAnnulus(x, y, w_in, w_out, h_out, θ)
RectangularAnnulus(position, w_in, w_out, h_out, θ)
A rectangular annulus with inner width w_in
, outer width w_out
, outer height h_out
, and position angle θ
in degrees. h_in
is automatically calculated from w_in / w_out * h_out
. Note that w_out ≥ w_in > 0
.
Examples
julia> ap = RectangularAnnulus(0, 0, 5, 10, 8, 45)
RectangularAnnulus(0.0, 0.0, w_in=5.0, w_out=10.0, h_in=4.0, h_out=8.0, θ=45.0°)
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.