Skip to content

Commit

Permalink
handle another SPICE error, update codecov.yml for new version
Browse files Browse the repository at this point in the history
  • Loading branch information
bhazelton authored and mkolopanis committed Mar 25, 2024
1 parent ffa2790 commit f82e089
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
3 changes: 1 addition & 2 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
codecov:
ci:
- !travis-ci # ignore CI builds by Travis
- !azure-pipelines # ignore CI builds by azure pipelines
- "!azure-pipelines" # ignore CI builds by azure pipelines
25 changes: 15 additions & 10 deletions pyuvdata/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4516,16 +4516,21 @@ def test_uvw_track_generator(flip_u, use_uvw, use_earthloc):
@pytest.mark.parametrize("selenoid", ["SPHERE", "GSFC", "GRAIL23", "CE-1-LAM-GEO"])
def test_uvw_track_generator_moon(selenoid):
# Note this isn't a particularly deep test, but it at least exercises the code.
gen_results = uvutils.uvw_track_generator(
lon_coord=0.0,
lat_coord=0.0,
coord_frame="icrs",
telescope_loc=(0, 0, 0),
time_array=2456789.0,
antenna_positions=np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1]]),
telescope_frame="mcmf",
ellipsoid=selenoid,
)
from spiceypy.utils.exceptions import SpiceUNKNOWNFRAME

try:
gen_results = uvutils.uvw_track_generator(
lon_coord=0.0,
lat_coord=0.0,
coord_frame="icrs",
telescope_loc=(0, 0, 0),
time_array=2456789.0,
antenna_positions=np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1]]),
telescope_frame="mcmf",
ellipsoid=selenoid,
)
except SpiceUNKNOWNFRAME as err:
pytest.skip("SpiceUNKNOWNFRAME error: " + str(err))

# Check that the total lengths all match 1
assert np.allclose((gen_results["uvw"] ** 2.0).sum(1), 2.0)
Expand Down

0 comments on commit f82e089

Please sign in to comment.