Skip to content

Commit

Permalink
Merge pull request #2279 from jaymedina/add-plato
Browse files Browse the repository at this point in the history
Add PLATO to Catalogs
  • Loading branch information
bsipocz authored Feb 19, 2022
2 parents 5740dc7 + 03eca88 commit 6400d6c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ mast

- GALEX data is now available to download anonymously from the public STScI S3 buckets. [#2261]

- Adding the All-Sky PLATO Input Catalog ('plato') as a catalog option for methods of ``astroquery.mast.Catalogs``. [#2279]

Infrastructure, Utility and Other Changes and Additions
-------------------------------------------------------

Expand Down
10 changes: 9 additions & 1 deletion astroquery/mast/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def __init__(self):

services = {"panstarrs": {"path": "panstarrs/{data_release}/{table}.json",
"args": {"data_release": "dr2", "table": "mean"}}}

self._service_api_connection.set_service_params(services, "catalogs", True)

self.catalog_limit = None
Expand Down Expand Up @@ -141,10 +142,17 @@ def query_region_async(self, coordinates, radius=0.2*u.deg, catalog="Hsc",
if version == 1:
service = "Mast.Catalogs.GaiaDR1.Cone"
else:
if version not in (2, None):
if version not in (None, 2):
warnings.warn("Invalid Gaia version number, defaulting to DR2.", InputWarning)
service = "Mast.Catalogs.GaiaDR2.Cone"

elif catalog.lower() == 'plato':
if version in (None, 1):
service = "Mast.Catalogs.Plato.Cone"
else:
warnings.warn("Invalid PLATO catalog version number, defaulting to DR1.", InputWarning)
service = "Mast.Catalogs.Plato.Cone"

else:
service = "Mast.Catalogs." + catalog + ".Cone"
self.catalog_limit = None
Expand Down
5 changes: 5 additions & 0 deletions astroquery/mast/tests/test_mast_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,11 @@ def test_catalogs_query_object(self):
assert isinstance(result, Table)
assert '441662144' in result['ID']

result = mast.Catalogs.query_object('M1',
radius=0.001,
catalog='plato')
assert 'PICidDR1' in result.colnames

def test_catalogs_query_criteria_async(self):
# without position
responses = mast.Catalogs.query_criteria_async(catalog="Tic",
Expand Down
3 changes: 2 additions & 1 deletion docs/mast/mast.rst
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,8 @@ The Catalogs class provides access to a subset of the astronomical catalogs stor
- The TESS Input Catalog (TIC)
- The TESS Candidate Target List (CTL)
- The Disk Detective Catalog
- PanSTARRS (DR1, DR2)
- The PanSTARRS Catalog (DR1 and DR2)
- The All-Sky PLATO Input Catalog (DR1)

Positional Queries
------------------
Expand Down

0 comments on commit 6400d6c

Please sign in to comment.