<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Hi Tim,</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">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.</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Thanks,</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Tim</div> <br> <div id="bloop_sign_1485514351835307008" class="bloop_sign"><div style="font-family:helvetica,arial;font-size:13px">-- <br>Tim Cornwell<br>Sent with Airmail</div></div> <br><p class="airmail_on">On 27 January 2017 at 10:51:42 am, Tim Staley (<a href="mailto:tim.staley@physics.ox.ac.uk">tim.staley@physics.ox.ac.uk</a>) wrote:</p> <blockquote type="cite" class="clean_bq"><span><div><div></div><div>Hi Tim,
<br>
<br>you want something like the following:
<br>
<br>    from astropy.coordinates import SkyCoord, AltAz, EarthLocation
<br>
<br>    from astropy.time import Time
<br>    import astropy.units as u
<br>
<br>    obs_time = Time('2017-01-01T18:00')
<br>
<br>    sky_posn = SkyCoord(0 * u.deg, 30 * u.deg)
<br>    earth_location = EarthLocation.from_geodetic(0*u.deg, 35*u.deg)
<br>
<br>    altaz = sky_posn.transform_to(
<br>         AltAz(obstime=obs_time,
<br>              location=earth_location))
<br>
<br>    print(altaz.alt.deg, altaz.az.deg)
<br>
<br>
<br>Cheers,
<br>Tim
<br>
<br>On 27/01/17 10:34, Tim Cornwell wrote:
<br>> Hi
<br>>
<br>> I am given an hour angle and wish to calculate alt/az or zenith  
<br>> angle/parallactic angle for a given SkyCoord and Location. After  
<br>> reading the documentation and many tries, I cannot see how to do this  
<br>> with the current Astropy Time/Angle classes. It is possible?
<br>>
<br>> Thanks,
<br>> Tim
<br>>
<br>> --  
<br>> Tim Cornwell
<br>> Sent with Airmail
<br>>
<br>>
<br>> _______________________________________________
<br>> AstroPy mailing list
<br>> AstroPy@scipy.org
<br>> https://mail.scipy.org/mailman/listinfo/astropy
<br>
<br>
<br>_______________________________________________
<br>AstroPy mailing list
<br>AstroPy@scipy.org
<br>https://mail.scipy.org/mailman/listinfo/astropy
<br></div></div></span></blockquote><img src="https://appservice-dot-mystic-tempo-847.appspot.com/rr/ma2/5/AwEH2ogzdcyWjKNqWlbHtzIDSbF7TaSWjydrAXw9KVQNjths70-0AuuWatpk9naMOxFhllL6_7aMolRsbMQ0Boe_ATokGOOLV3So6aiiOPF-Qh4Kn9TLIo__BdmkTAMyW0-C4KORYim95yjBNMh3VLOeMopIrAUnoWxLI0o89Ws6a-5l-wxsl9d78yFmtgS468-zvvDKRZmgThWsR0th8hu8mubU8P0SBHRBrq67FkhAta25ouOrdOu9-Lvjihm6nu-zWjpwUskKx7_tdw0MLMvVAGKOUp1R5XVQ7p89ocR2liIBGqEpkTMFg-mN47c-nA3RlnI_II1KVHP-GgEZrobl" width="1" height="1"></body></html>