# Path: emirdrp/recipes/aiv/procedures.py
# def encloses_annulus(x_min, x_max, y_min, y_max, nx, ny, r_in, r_out):
#     '''Encloses function backported from old photutils'''
# 
#     gout = circular_overlap_grid(x_min, x_max, y_min, y_max, nx, ny, r_out, 1, 1)
#     gin = circular_overlap_grid(x_min, x_max, y_min, y_max, nx, ny, r_in, 1, 1)
#     return gout - gin


import pytest
import numpy
from numpy.testing import assert_allclose
from ..procedures import encloses_annulus
# (at your option) any later version.
#
# PyEmir is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with PyEmir.  If not, see <http://www.gnu.org/licenses/>.
#

'''Test the procedures module'''





def test_encloses_annulus():
    a = numpy.zeros((100, 100))
    r_in = 6
    r_out = 15.5
    xc = 51.4
    yc = 52.9

    x_min = -0.5 - xc
    x_max = a.shape[1] - 0.5 - xc
    y_min = -0.5 - yc
    y_max = a.shape[1] - 0.5 - yc



# Path: emirdrp/recipes/aiv/procedures.py
# def encloses_annulus(x_min, x_max, y_min, y_max, nx, ny, r_in, r_out):
#     '''Encloses function backported from old photutils'''
# 
#     gout = circular_overlap_grid(x_min, x_max, y_min, y_max, nx, ny, r_out, 1, 1)
#     gin = circular_overlap_grid(x_min, x_max, y_min, y_max, nx, ny, r_in, 1, 1)
#     return gout - gin


# Path: emirdrp/recipes/aiv/tests/test_procedures.py
import pytest
import numpy
from numpy.testing import assert_allclose
from ..procedures import encloses_annulus

# (at your option) any later version.
#
# PyEmir is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with PyEmir.  If not, see <http://www.gnu.org/licenses/>.
#

'''Test the procedures module'''





def test_encloses_annulus():
    a = numpy.zeros((100, 100))
    r_in = 6
    r_out = 15.5
    xc = 51.4
    yc = 52.9

    x_min = -0.5 - xc
    x_max = a.shape[1] - 0.5 - xc
    y_min = -0.5 - yc
    y_max = a.shape[1] - 0.5 - yc



    aa = encloses_annulus(x_min, x_max, y_min, y_max,