Exemplo n.º 1
0
def test_observatory_values():
    """ Observatory values test along with beam halfwidth calculation test"""
    obs = Observatory(telescope_id=0)
    assert obs.get_telescope_name() == 'Fake', error_msg("Incorrect name")
    assert obs.get_xyz_coords() == (0.0, 0.0,
                                    0.0), error_msg("Incorrect XYZ coords")

    gbt = Observatory(telescope_id=6)
    beam_halfwidth = gbt.calc_beam_halfwidth(100)
    assert (beam_halfwidth - 3710.19799582) < .0000001, error_msg(
        "Incorrect beam haflwidth calculation")

    print(gbt.__str__())
Exemplo n.º 2
0
def test_observatory_values():
    r""" Observatory values test along with beam halfwidth calculation test"""
    print("\n===== Begin test_observatory_values")
    obs = Observatory(telescope_id=0)
    print(obs.get_string())
    assert obs.get_telescope_name() == 'Fake', error_msg("Incorrect telescope name")
    assert obs.get_xyz_coords() == [0.0, 0.0, 0.0], error_msg("Incorrect XYZ coords")

    gbt = Observatory(telescope_id=6)
    beam_halfwidth = gbt.calc_beam_halfwidth(100)
    assert (beam_halfwidth - 3710.19799582) < .0000001, \
        error_msg("Incorrect beam haflwidth calculation")
    print("===== End test_observatory_values")