Skip to content

Commit

Permalink
Revert "Try not going through the CIRS frame"
Browse files Browse the repository at this point in the history
This reverts commit 0c0849c.

This makes things much slower, almost 10x. This is likely because the
scalar pole and field centre are broadcast against all antenna
positions and times.
  • Loading branch information
sjperkins committed Jul 6, 2017
1 parent 0c0849c commit 5cef03e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions montblanc/util/parallactic_angles.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,13 @@ 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.transform_to(altaz_frame)
fc_altaz = fc.transform_to(altaz_frame)
pole_altaz = pole_cirs[:,None].transform_to(altaz_frame)
fc_altaz = fc_cirs[:,None].transform_to(altaz_frame)
return fc_altaz.position_angle(pole_altaz)

if __name__ == "__main__":
Expand Down

0 comments on commit 5cef03e

Please sign in to comment.