Integrating over a circle in a 2D array
<p>I'm trying to integrate over the area of a circular aperture superimposed on an array of pixels (see image below).  However, I need to determine the fraction of flux (area) inside the circular aperture, and leave out anything outside the circular aperture in each square pixel on the boundary of the circle.  </p>

<p>How would I go about coding this in numpy/python such that I am getting an accurate measure of the flux inside the circle?</p>

<p><a href="https://i.stack.imgur.com/Y717C.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y717C.jpg" alt="enter image description here"></a></p>