How to use the pymap3d.radec2azel function in pymap3d

To help you get started, we’ve selected a few pymap3d examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github scivision / pymap3d / tests / test_sky.py View on Github external
def test_radec2azel(usevallado):
    azel1 = pm.radec2azel(*radec, lat, lon, t0, usevallado=usevallado)
    assert azel1 == approx(azel, rel=0.01)
github scivision / pymap3d / tests / test_sky.py View on Github external
def test_numpy_radec2azel(usevallado):
    pytest.importorskip("numpy")
    azel1 = pm.radec2azel([166.503208, 166.503208], [55, 55], lat, lon, t0, usevallado=usevallado)
    assert azel1 == approx(azel, rel=0.01)
github scivision / pymap3d / examples / radec2azel.py View on Github external
def main():
    p = ArgumentParser(description="RightAscension,Declination =>" "Azimuth,Elevation")
    p.add_argument("ra", help="right ascension [degrees]", type=float)
    p.add_argument("dec", help="declination [degrees]", type=float)
    p.add_argument("lat", help="WGS84 latitude of observer [degrees]", type=float)
    p.add_argument("lon", help="WGS84 latitude of observer [degrees]", type=float)
    p.add_argument("time", help="UTC time of observation YYYY-mm-ddTHH:MM:SSZ")
    P = p.parse_args()

    az_deg, el_deg = radec2azel(P.ra, P.dec, P.lat, P.lon, P.time)
    print("azimuth: [deg]", az_deg)
    print("elevation [deg]:", el_deg)