Skip to content

Commit

Permalink
Fixing absence of antenna_frame keyword in calc_app_coords
Browse files Browse the repository at this point in the history
  • Loading branch information
wps2n committed Oct 12, 2023
1 parent 4a28e01 commit 50644d0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pyuvdata/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3567,6 +3567,7 @@ def calc_app_coords(
time_array=None,
lst_array=None,
telescope_loc=None,
antenna_frame="itrs",
pm_ra=None,
pm_dec=None,
vrad=None,
Expand Down Expand Up @@ -3647,6 +3648,16 @@ def calc_app_coords(
hasmoon and isinstance(telescope_loc, MoonLocation)
):
site_loc = telescope_loc
elif antenna_frame.upper() == "MCMF":
if not hasmoon:
raise ValueError(
"Need to install 'lunarsky' package to work with MCMF frame."
)
site_loc = MoonLocation.from_selenodetic(
telescope_loc[1] * (180.0 / np.pi),
telescope_loc[0] * (180.0 / np.pi),
height = telescope_loc[2],
)
else:
site_loc = EarthLocation.from_geodetic(
telescope_loc[1] * (180.0 / np.pi),
Expand Down

0 comments on commit 50644d0

Please sign in to comment.