[AstroPy] Calculating alt/az or zenith angle/parallactic angle

Erik Tollerud erik.tollerud at gmail.com
Sun Jan 29 23:05:43 EST 2017


Tim (C), I don't quite understand what you mean here.  You'd need to have
*some* absolute time, because that's the only way to pin down the
orientation of the Earth due to precession/nutation.  Are you saying you
want to specify an epoch to lock that down and then have as the remaining
input just the hour angle?  Or you want to specify an epoch for the
precession/nutation and then additionally specify the hour angle and
coordinate? The latter is nominally impossible, but there's probably some
"good enough" solutions that you could implement with Astropy.

---
Erik T

On Fri, Jan 27, 2017 at 5:56 AM, Tim Cornwell <realtimcornwell at gmail.com>
wrote:

> Hi Tim,
>
> I can see how that works bit what I want is to be able to calculate from
> the local hour angle i.e. a relative time (LST-RA) instead of starting with
> an absolute time. For context, I’m writing some simulation code and don’t
> need to work with absolute time. From what I see, it’s not possible in
> astropy to start with hour angle instead of some form of absolute time. I
> can work around this but it seems to be a hole in either the package or
> more likely in the documentation.
>
> Thanks,
> Tim
>
> --
> Tim Cornwell
> Sent with Airmail
>
> On 27 January 2017 at 10:51:42 am, Tim Staley (tim.staley at physics.ox.ac.uk)
> wrote:
>
> 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
>
>
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> https://mail.scipy.org/mailman/listinfo/astropy
>
>
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> https://mail.scipy.org/mailman/listinfo/astropy
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20170129/977b079c/attachment.html>


More information about the AstroPy mailing list