circular_footprint#
- photutils.utils.circular_footprint(radius, dtype=<class 'int'>)[source]#
Create a circular 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:
- radiusint
The radius of the circular footprint.
- dtypedata-type, optional
The data type of the output
ndarray
.
- Returns:
- footprint
ndarray
A footprint where array elements are 1 within the footprint and 0 otherwise.
- footprint
Examples
>>> from photutils.utils import circular_footprint >>> circular_footprint(2) array([[0, 0, 1, 0, 0], [0, 1, 1, 1, 0], [1, 1, 1, 1, 1], [0, 1, 1, 1, 0], [0, 0, 1, 0, 0]])