예제 #1
0
    def test_radial_profile_sum(checkerboard_image):
        center = SkyCoord(0, 0, unit="deg", frame="galactic")
        p = ImageProfileEstimator(axis="radial", method="sum", center=center)
        profile = p.run(checkerboard_image)

        desired = [4.0, 8.0, 20.0, 12.0, 12.0] * u.Unit("cm-2 s-1")
        assert_quantity_allclose(profile.profile, desired)
예제 #2
0
    def test_x_edges_lat(checkerboard_image):
        x_edges = Angle(np.linspace(-0.06, 0.06, 4), "deg")

        p = ImageProfileEstimator(x_edges=x_edges, axis="lat", method="sum")
        profile = p.run(checkerboard_image)

        desired = 20 * np.ones(3) * u.Unit("cm-2 s-1")
        assert_quantity_allclose(profile.profile, desired)
예제 #3
0
    def test_lon_profile_mean(checkerboard_image):
        p = ImageProfileEstimator(axis="lon", method="mean")
        profile = p.run(checkerboard_image)

        desired = np.ones(10) * u.Unit("cm-2 s-1")
        assert_quantity_allclose(profile.profile, desired)
예제 #4
0
    def test_lat_profile_sum(checkerboard_image):
        p = ImageProfileEstimator(axis="lat", method="sum")
        profile = p.run(checkerboard_image)

        desired = 10 * np.ones(6) * u.Unit("cm-2 s-1")
        assert_quantity_allclose(profile.profile, desired)