Skip to content

Commit 481efb0

Browse files
snbiancoCopilot
andcommitted
Changelog
Co-authored-by: Copilot <copilot@github.com>
1 parent c349db7 commit 481efb0

6 files changed

Lines changed: 27 additions & 8 deletions

File tree

CHANGES.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ esa.emds.einsteinprobe
2424

2525
- New module to access the ESA Einstein Probe Science Archive. [#3511]
2626

27+
mast
28+
^^^^
29+
30+
- Updated ``Catalogs`` interface for MAST TAP catalogs, including collection/catalog discovery helpers and a unified query workflow across
31+
positional and non-positional searches. [#3582]
32+
2733

2834

2935
API changes
@@ -76,6 +82,19 @@ mast
7682
- The ``objectname`` keyword is deprecated in ``MastMissions`` in favor of ``object_names``. [#3540]
7783
- The ``objectname`` parameter in ``Catalogs``, ``Observations``, ``Tesscut``, and ``utils`` is deprecated
7884
in favor of ``object_name``. [#3567]
85+
- ``Catalogs`` has been refactored around VO-TAP queries. The new workflow uses ``collection`` + ``catalog`` (instead of HSC/PanSTARRS-specific
86+
assumptions), supports discovery helpers (``get_collections``, ``get_catalogs``, ``get_column_metadata``), and
87+
adds ``supports_spatial_queries`` to inspect positional-query support before querying. [#3582]
88+
- ``Catalogs.query_criteria`` now provides a unified query interface for positional and non-positional searches, with support for
89+
cone searches around coordinates or an object, STC-S regions via the ``region`` parameter, column selection, sorting, count-only queries,
90+
pagination via ``limit``/``offset``, and a ``filters`` dictionary for column names that conflict with method arguments. [#3582]
91+
- ``Catalogs.query_region`` and ``Catalogs.query_object`` now follow the same unified backend as ``query_criteria``, including support
92+
for ``collection``/``catalog``, ``limit``/``offset``, ``select_cols``, sorting, and advanced criteria filters. [#3582]
93+
- The legacy ``version``, ``pagesize``, and ``page`` parameters in ``Catalogs`` query methods are now deprecated in favor
94+
of ``collection``/``catalog`` and ``limit``/``offset``. [#3582]
95+
- Passing a collection name via ``Catalogs(..., catalog=...)`` is deprecated; use the ``collection`` parameter instead. [#3582]
96+
- ``Catalogs`` legacy HSC-only helper methods (``query_hsc_matchid[_async]``, ``get_hsc_spectra[_async]``, and
97+
``download_hsc_spectra``) are deprecated and will be removed in a future release. [#3582]
7998

8099
vo_conesearch
81100
^^^^^^^^^^^^^

astroquery/mast/catalog_collection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,4 +512,4 @@ def _verify_criteria(self, catalog, **criteria):
512512
raise InvalidQueryError(
513513
f"Filter '{kwd}' is not recognized for collection '{self.name}' and "
514514
f"catalog '{catalog}'.{suggestion}"
515-
)
515+
)

astroquery/mast/collections.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1583,4 +1583,4 @@ def _make_data_url(self, row):
15831583
return f"https://hla.stsci.edu/cgi-bin/ecfproxy?file_id={dataset}.fits"
15841584

15851585

1586-
Catalogs = CatalogsClass()
1586+
Catalogs = CatalogsClass()

astroquery/mast/tests/data/README.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ To generate `~astroquery.mast.tests.data.tap_catalogs.vot`, use the following:
8282
>>> import pyvo
8383
>>> from astropy.io.votable import writeto
8484
...
85-
>>> tap_service = pyvo.dal.TAPService("https://masttest.stsci.edu/vo-tap/api/v0.1/tic")
85+
>>> tap_service = pyvo.dal.TAPService("https://mast.stsci.edu/vo-tap/api/v0.1/tic")
8686
>>> query = 'SELECT table_name, description FROM tap_schema.tables'
8787
>>> result = tap_service.run_sync(query)
8888
>>> writeto(result.votable, 'tap_catalogs.vot') # doctest: +SKIP
@@ -94,7 +94,7 @@ To generate `~astroquery.mast.tests.data.tap_columns.vot`, use the following:
9494
>>> import pyvo
9595
>>> from astropy.io.votable import writeto
9696
...
97-
>>> tap_service = pyvo.dal.TAPService("https://masttest.stsci.edu/vo-tap/api/v0.1/tic")
97+
>>> tap_service = pyvo.dal.TAPService("https://mast.stsci.edu/vo-tap/api/v0.1/tic")
9898
>>> query = "SELECT column_name, datatype, unit, ucd, description FROM tap_schema.columns WHERE table_name = 'dbo.catalogrecord'"
9999
>>> result = tap_service.run_sync(query)
100100
>>> writeto(result.votable, 'tap_columns.vot') # doctest: +SKIP
@@ -106,7 +106,7 @@ To generate `~astroquery.mast.tests.data.tap_capabilities.vot`, use the followin
106106
>>> import requests
107107
>>> import pyvo
108108
...
109-
>>> tap_service = pyvo.dal.TAPService("https://masttest.stsci.edu/vo-tap/api/v0.1/tic")
109+
>>> tap_service = pyvo.dal.TAPService("https://mast.stsci.edu/vo-tap/api/v0.1/tic")
110110
>>> caps_url = tap_service.baseurl.rstrip("/") + "/capabilities"
111111
>>> resp = requests.get(caps_url)
112112
>>> resp.raise_for_status()
@@ -121,7 +121,7 @@ To generate `~astroquery.mast.tests.data.tap_results.vot`, use the following:
121121
>>> import pyvo
122122
>>> from astropy.io.votable import writeto
123123
...
124-
>>> tap_service = pyvo.dal.TAPService("https://masttest.stsci.edu/vo-tap/api/v0.1/tic")
124+
>>> tap_service = pyvo.dal.TAPService("https://mast.stsci.edu/vo-tap/api/v0.1/tic")
125125
>>> query = "SELECT TOP 10 * FROM dbo.catalogrecord WHERE CONTAINS(POINT('ICRS', ra, dec), CIRCLE('ICRS', 23.34086, 60.658, 0.002)) = 1"
126126
>>> result = tap_service.run_sync(query)
127127
>>> writeto(result.votable, 'tap_results.vot') # doctest: +SKIP

astroquery/mast/tests/test_mast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2884,4 +2884,4 @@ def test_download_file_from_cloud_verbose(patch_boto3):
28842884
)
28852885
# Ensure callback was supplied
28862886
_, kwargs = mock_resource.Bucket.return_value.download_file.call_args
2887-
assert "Callback" in kwargs
2887+
assert "Callback" in kwargs

astroquery/mast/tests/test_mast_remote.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1724,4 +1724,4 @@ def check_cutout_list(cutout_list, data_shape):
17241724
with pytest.warns(NoResultsWarning, match='Missing HAP files for input target. Cutout not performed.'):
17251725
cutout_list = Hapcut.get_cutouts(coordinates=bad_coord)
17261726
assert isinstance(cutout_list, list)
1727-
assert len(cutout_list) == 0
1727+
assert len(cutout_list) == 0

0 commit comments

Comments
 (0)