[AstroPy] Hour Angle from location and alt/az

Tim Jenness tim.jenness at gmail.com
Sat Nov 5 16:40:58 EDT 2016


PAL (also palpy and SLALIB) has
https://github.com/Starlink/pal/blob/master/palDh2e.c but that routine
hasn't made it to SOFA/ERFA. I'm surprised astropy.coords does not support
azel to hadec.

-- 
Tim Jenness

On Fri, Nov 4, 2016 at 5:04 PM, John K. Parejko <parejkoj at uw.edu> wrote:

> Hello astropythians,
>
> I’m trying to work around a distinct lack of UT1 and LST in some telescope
> file headers, and was wondering if there’s a straight-forward astropy way
> to get a source’s Hour Angle from the alt/az, ra/dec, and telescope
> location. I can build an altaz SkyCoord, but I’m not sure what to do with
> it from there:
>
> loc = coord.EarthLocation.from_geodetic(long, lat, elevation)
> sky = coord.SkyCoord(az, alt, location=loc, frame='altaz', unit='deg’)
>
> I can’t transform this to ICRS:
>
> ipdb> sky.transform_to(coord.ICRS)
> *** TypeError: unsupported operand type(s) for -: 'NoneType' and ‘float’
>
> and there’s not an “hour_angle” method that I can see in either of those.
>
> Per the internet[1], one should be able to get HA from alt/az and dec
> directly (modulo refraction corrections):
>
> HA = asin(- sin(az)*cos(alt) / cos(dec))
>
> I can do that, but I was hoping for a nice and tidy astropy method.
>
> Thanks,
> John
>
> 1: http://star-www.st-and.ac.uk/~fv/webnotes/chapter7.htm
>
> --
> *************************
> John Parejko
> parejkoj at uw.edu
> http://staff.washington.edu/parejkoj/
> Department of Physics and Astronomy
> University of Washington
> Seattle, WA
> **************************
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> 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/20161105/79aeaa0d/attachment.html>


More information about the AstroPy mailing list