circular_annulus_footprint

astroimtools.filtering.circular_annulus_footprint(radius_inner, radius_outer, dtype=<class 'int'>)[source]

Create a circular annulus footprint.

A pixel is considered to be entirely in or out of the footprint depending on whether its center is in or out of the footprint. The size of the output array is the minimal bounding box for the footprint.

Parameters:
radius_innerint

The inner radius of the circular annulus.

radius_outerint

The outer radius of the circular annulus.

dtypedata-type, optional

The data type of the output ndarray.

Returns:
footprintndarray

A footprint where array elements are 1 within the footprint and 0 otherwise.

Examples

>>> from astroimtools import circular_footprint
>>> circular_annulus_footprint(1, 2)
array([[0, 0, 1, 0, 0],
       [0, 1, 0, 1, 0],
       [1, 0, 0, 0, 1],
       [0, 1, 0, 1, 0],
       [0, 0, 1, 0, 0]])