Exemplo n.º 1
0
def test_functions_raise_non_frame_map(non_helioprojective_map):
    with pytest.raises(ValueError, match=r"HeliographicCarrington, .* Helioprojective"):
        contains_full_disk(non_helioprojective_map)
    with pytest.raises(ValueError, match=r"HeliographicCarrington, .* Helioprojective"):
        contains_solar_center(non_helioprojective_map)
    with pytest.raises(ValueError, match=r"HeliographicCarrington, .* Helioprojective"):
        is_all_off_disk(non_helioprojective_map)
    with pytest.raises(ValueError, match=r"HeliographicCarrington, .* Helioprojective"):
        contains_limb(non_helioprojective_map)
    with pytest.raises(ValueError, match=r"HeliographicCarrington, .* Helioprojective"):
        on_disk_bounding_coordinates(non_helioprojective_map)
Exemplo n.º 2
0
def test_on_disk_bounding_coordinates(aia171_test_map):
    bl, tr = on_disk_bounding_coordinates(aia171_test_map)
    np.testing.assert_almost_equal(bl.Tx.to(u.arcsec).value,
                                   -954.17124289,
                                   decimal=1)
    np.testing.assert_almost_equal(bl.Ty.to(u.arcsec).value,
                                   -965.93063472,
                                   decimal=1)
    np.testing.assert_almost_equal(tr.Tx.to(u.arcsec).value,
                                   964.27061417,
                                   decimal=1)
    np.testing.assert_almost_equal(tr.Ty.to(u.arcsec).value,
                                   971.63586861,
                                   decimal=1)
Exemplo n.º 3
0
def test_on_disk_bounding_coordinates(aia171_test_map):
    bl, tr = on_disk_bounding_coordinates(aia171_test_map)
    np.testing.assert_almost_equal(bl.Tx.to(u.arcsec).value, -954.17124289, decimal=1)
    np.testing.assert_almost_equal(bl.Ty.to(u.arcsec).value, -965.93063472, decimal=1)
    np.testing.assert_almost_equal(tr.Tx.to(u.arcsec).value, 964.27061417, decimal=1)
    np.testing.assert_almost_equal(tr.Ty.to(u.arcsec).value, 971.63586861, decimal=1)