# How to use the photutils.RectangularAperture function in photutils

## To help you get started, weâ€™ve selected a few photutils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

afeinstein20 / eleanor / eleanor / targetdata.py View on Github
``````def square_aperture(pos, l, w, t):
return RectangularAperture(pos, l, w, t)``````
afeinstein20 / eleanor / eleanor / ellie.py View on Github
``````def aperture(r, pos):
""" Creates circular & rectangular apertures of given size """
circ = CircularAperture(pos, r)
rect = RectangularAperture(pos, r, r, 0.0)
return circ, rect``````
afeinstein20 / eleanor / ELLIE / ellie.py View on Github
``````def aperture(r, pos):
""" Creates circular & rectangular apertures of given size """
circ = CircularAperture(pos, r)
rect = RectangularAperture(pos, r, r, 0.0)
return circ, rect``````
afeinstein20 / eleanor / standard_apertures.py View on Github
``````def rectangle(pos, l, w, t):
return RectangularAperture(pos, l, w, t)``````
afeinstein20 / eleanor / ELLIE / ellie.py View on Github
``````def create_ap(pos):
""" Defines the custom aperture, as inputted by the user """
nonlocal shape, r, l, w, t
if shape=='circle':
return CircularAperture(pos, r)
elif shape=='rectangle':
return RectangularAperture(pos, l, w, t)
else:
print("Shape of aperture not recognized. Please input: circle or rectangle")
return``````
afeinstein20 / eleanor / ELLIE_v1.2 / bestAperture.py View on Github
``````def aperture(r, pos):
circ = CircularAperture(pos, r)
rect = RectangularAperture(pos, r, r, 0.0)
return circ, rect``````

## photutils

An Astropy package for source detection and photometry

BSD-3-Clause