Skip to content

Commit

Permalink
fixed some tests to work with the near-field modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Oct 8, 2024
1 parent 87f6fb3 commit 5d07fec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/pyuvdata/uvdata/uvdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -4635,10 +4635,9 @@ def _phase_dict_helper(
elif (key == "cat_id") and (phase_dict[key] is not None):
# If this is the cat_id, make it an int
phase_dict[key] = int(phase_dict[key])
elif phase_dict[key] not in (None, str) and key not in (
"cat_dist_units",
"cat_near_field",
):
elif not (
phase_dict[key] is None or isinstance(phase_dict[key], str)
) and key not in ("cat_dist_units", "cat_near_field"):
phase_dict[key] = float(phase_dict[key])

return phase_dict
Expand Down
2 changes: 2 additions & 0 deletions tests/uvcal/test_uvcal.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ def uvcal_phase_center_main(gain_data_main):
"cat_pm_dec": None,
"cat_vrad": None,
"cat_dist": None,
"cat_dist_units": "pc",
"cat_near_field": False,
"info_source": "file",
}
}
Expand Down

0 comments on commit 5d07fec

Please sign in to comment.