示例#1
0
def test_Sky2Pix_PlateCarree_inverse():
    model = projections.Sky2Pix_PlateCarree()
    inverse = model.inverse
    assert isinstance(inverse, projections.Pix2Sky_PlateCarree)

    x = np.linspace(0, 1, 100)
    y = np.linspace(0, 1, 100)
    a, b = model(*inverse(x, y))
    assert_allclose(a, x, atol=1e-12)
    assert_allclose(b, y, atol=1e-12)
    a, b = inverse(*model(x, y))
    assert_allclose(a, x, atol=1e-12)
    assert_allclose(b, y, atol=1e-12)
示例#2
0
def test_Projection_properties():
    projection = projections.Sky2Pix_PlateCarree()
    assert projection.n_inputs == 2
    assert projection.n_outputs == 2