Skip to content

Commit

Permalink
Try not going through the CIRS frame
Browse files Browse the repository at this point in the history
Apparently this happens anyway when going to AltAz.
  • Loading branch information
sjperkins committed Jul 6, 2017
1 parent 214b633 commit 0c0849c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions montblanc/util/parallactic_angles.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,9 @@ def _parallactic_angle_astropy(times, ap, fc):
fc = SkyCoord(ra=fc[0], dec=fc[1], unit=units.rad, frame='fk5')
pole = SkyCoord(ra=0, dec=90, unit=units.deg, frame='fk5')

cirs_frame = CIRS(obstime=times)
pole_cirs = pole.transform_to(cirs_frame)
fc_cirs = fc.transform_to(cirs_frame)

altaz_frame = AltAz(location=ap[None,:], obstime=times[:,None])
pole_altaz = pole_cirs[:,None].transform_to(altaz_frame)
fc_altaz = fc_cirs[:,None].transform_to(altaz_frame)
pole_altaz = pole.transform_to(altaz_frame)
fc_altaz = fc.transform_to(altaz_frame)
return fc_altaz.position_angle(pole_altaz)

if __name__ == "__main__":
Expand Down

0 comments on commit 0c0849c

Please sign in to comment.