Skip to content

Commit ed3bdff

Browse files
committed
Get cloud URIs for HLSPs
test case, changelog
1 parent 30c69ee commit ed3bdff

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGES.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,9 @@ mast
226226
- Present users with an error when nonexistent query criteria are used in ``mast.MastMissions`` query functions. [#3126]
227227

228228
- Present users with an error when nonexistent query criteria are used in ``mast.Catalogs.query_region`` and
229-
``mast.Catalogs.query_object`` [#3126]
229+
``mast.Catalogs.query_object``. [#3126]
230+
231+
- Handle HLSP data products in ``Observations.get_cloud_uris``. [#3126]
230232

231233
mpc
232234
^^^

astroquery/mast/tests/test_mast_remote.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ def test_get_cloud_uri(self, test_data_uri, expected_cloud_uri):
605605
assert len(uri) > 0, f'Product for dataURI {test_data_uri} was not found in the cloud.'
606606
assert uri == expected_cloud_uri, f'Cloud URI does not match expected. ({uri} != {expected_cloud_uri})'
607607

608-
@pytest.mark.parametrize("test_obs_id", ["25568122", "31411"])
608+
@pytest.mark.parametrize("test_obs_id", ["25568122", "31411", "107604081"])
609609
def test_get_cloud_uris(self, test_obs_id):
610610
pytest.importorskip("boto3")
611611

astroquery/mast/utils.py

+2
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@ def mast_relative_path(mast_uri):
194194
path = path.lstrip("/mast/")
195195
elif '/ps1/' in path:
196196
path = path.replace("/ps1/", "panstarrs/ps1/public/")
197+
elif 'hlsp' in path:
198+
path = path.replace("/hlsp_local/public/", "mast/")
197199
else:
198200
path = path.lstrip("/")
199201
result.append(path)

0 commit comments

Comments
 (0)