def test_no_border_if_nothing_passed(self):
        implane = ImagePlane(_image_hdu_square().header)
        implane.hdu.data = np.ones(implane.hdu.data.shape)
        rpb = ee.ReferencePixelBorder()
        implane = rpb.apply_to(implane)

        assert np.sum(implane.data) == 10201
    def test_ReferencePixelBorder_plot(self):
        from scopesim.optics.image_plane import ImagePlane
        from scopesim.tests.mocks.py_objects.imagehdu_objects import _image_hdu_square

        implane = ImagePlane(_image_hdu_square().header)
        implane.hdu.data = np.ones(implane.hdu.data.shape)
        eff = electronic.ReferencePixelBorder(all=5, top=15)

        if PLOTS:
            eff.plot(implane)
            plt.show()
    def test_sets_border_to_zero(self):
        implane = ImagePlane(_image_hdu_square().header)
        implane.hdu.data = np.ones(implane.hdu.data.shape)
        rpb = ee.ReferencePixelBorder(all=5, top=15)
        implane = rpb.apply_to(implane)

        if PLOTS:
            plt.imshow(implane.data, origin="bottom")
            plt.show()

        assert np.sum(implane.data) == 7371
Esempio n. 4
0
def fixture_imageplane():
    """Instantiate an ImagePlane object"""
    implane = ImagePlane(_image_hdu_square().header)
    return implane
Esempio n. 5
0
def image_hdu_square_mm():
    return _image_hdu_square("D")
Esempio n. 6
0
def image_hdu_square():
    return _image_hdu_square()