Esempio n. 1
0
def test_observatory_procs():
    r""" Try the member functions with Parkes """
    print("\n===== Begin test_observatory_procs")
    obs = Observatory(telescope_id=4)
    print(obs.get_string())
    print(obs.get_telescope_name())
    print(obs.get_telescope_name_short())
    print(obs.get_telescope_id())
    print(obs.get_xyz_coords())
    print(obs.get_dish_diameter())
    print(obs.get_string())
    print("===== End test_observatory_procs")
Esempio n. 2
0
def test_observatory_construction():
    r""" Constructor test """
    print("\n===== Begin test_observatory_construction")
    obs = Observatory()
    assert obs.get_telescope_name() == "Fake", error_msg("Wrong name for the fake observatory")
    obs = Observatory(telescope_id=4)
    assert obs.get_telescope_name() == "PARKES", error_msg("Wrong name for the Parkes observatory")
    assert obs.get_telescope_name_short() == "PK", \
        error_msg("Wrong short name for the Parkes observatory")
    obs = Observatory(telescope_name="GBT")
    assert obs.get_telescope_id() == 6, error_msg("Wrong Sigproc ID for the GBT observatory")
    print("===== End test_observatory_construction")