diff --git a/CHANGES.rst b/CHANGES.rst index 897d7f82d6..8322e42cef 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -226,7 +226,9 @@ mast - Present users with an error when nonexistent query criteria are used in ``mast.MastMissions`` query functions. [#3126] - Present users with an error when nonexistent query criteria are used in ``mast.Catalogs.query_region`` and - ``mast.Catalogs.query_object`` [#3126] + ``mast.Catalogs.query_object``. [#3126] + +- Handle HLSP data products in ``Observations.get_cloud_uris``. [#3126] mpc ^^^ diff --git a/astroquery/mast/tests/test_mast_remote.py b/astroquery/mast/tests/test_mast_remote.py index 89a5cd6f00..08f960c647 100644 --- a/astroquery/mast/tests/test_mast_remote.py +++ b/astroquery/mast/tests/test_mast_remote.py @@ -605,7 +605,7 @@ def test_get_cloud_uri(self, test_data_uri, expected_cloud_uri): assert len(uri) > 0, f'Product for dataURI {test_data_uri} was not found in the cloud.' assert uri == expected_cloud_uri, f'Cloud URI does not match expected. ({uri} != {expected_cloud_uri})' - @pytest.mark.parametrize("test_obs_id", ["25568122", "31411"]) + @pytest.mark.parametrize("test_obs_id", ["25568122", "31411", "107604081"]) def test_get_cloud_uris(self, test_obs_id): pytest.importorskip("boto3") diff --git a/astroquery/mast/utils.py b/astroquery/mast/utils.py index 9f7a25d731..56bfa5810a 100644 --- a/astroquery/mast/utils.py +++ b/astroquery/mast/utils.py @@ -194,6 +194,8 @@ def mast_relative_path(mast_uri): path = path.lstrip("/mast/") elif '/ps1/' in path: path = path.replace("/ps1/", "panstarrs/ps1/public/") + elif 'hlsp' in path: + path = path.replace("/hlsp_local/public/", "mast/") else: path = path.lstrip("/") result.append(path)