import matplotlib.pyplot as plt
from astropy.io import fits
from astropy.utils.data import get_pkg_data_filename
from regions.core import PixCoord
from regions.shapes.circle import CirclePixelRegion

filename = get_pkg_data_filename('photometry/M6707HH.fits')
hdulist = fits.open(filename)
hdu = hdulist[0]
center = PixCoord(158.5, 1053.5)
aperture = CirclePixelRegion(center, 4.)
mask = aperture.to_mask(mode='exact')

fig, ax = plt.subplots()
ax.imshow(hdu.data, origin='lower')
mask.bbox.plot(ax=ax, color='white')
aperture.plot(ax=ax, color='orange')
ax.set_xlim(120, 180)
ax.set_ylim(1000, 1059)
hdulist.close()