[AstroPy] Calculating alt/az or zenith angle/parallactic angle
Tim Staley
tim.staley at physics.ox.ac.uk
Fri Jan 27 05:51:34 EST 2017
Hi Tim,
you want something like the following:
from astropy.coordinates import SkyCoord, AltAz, EarthLocation
from astropy.time import Time
import astropy.units as u
obs_time = Time('2017-01-01T18:00')
sky_posn = SkyCoord(0 * u.deg, 30 * u.deg)
earth_location = EarthLocation.from_geodetic(0*u.deg, 35*u.deg)
altaz = sky_posn.transform_to(
AltAz(obstime=obs_time,
location=earth_location))
print(altaz.alt.deg, altaz.az.deg)
Cheers,
Tim
On 27/01/17 10:34, Tim Cornwell wrote:
> Hi
>
> I am given an hour angle and wish to calculate alt/az or zenith
> angle/parallactic angle for a given SkyCoord and Location. After
> reading the documentation and many tries, I cannot see how to do this
> with the current Astropy Time/Angle classes. It is possible?
>
> Thanks,
> Tim
>
> --
> Tim Cornwell
> Sent with Airmail
>
>
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> https://mail.scipy.org/mailman/listinfo/astropy
More information about the AstroPy
mailing list