Skip to content

MAST Catalogs.query_criteria fails with PanSTARRS #2716

@bcarry

Description

@bcarry

Hi all

recently, the columns keyword in mast.Catalogs.query_criteria is failing for PanSTARRS. The code used to work, and even the example in the documents has issues. I do not know if the problem is on the side of astroquery or MAST archive.

Code, taken from https://astroquery.readthedocs.io/en/latest/mast/mast.html

from astroquery.mast import Catalogs
catalog_data = Catalogs.query_criteria(coordinates="5.97754 32.53617", radius=0.01,
                                       catalog="PANSTARRS", table="mean", data_release="dr2",
                                       nStackDetections=[("gte", 2)],
                                       columns=["objName", "objID", "nStackDetections", "distance"],
                                       sort_by=[("desc", "distance")], pagesize=15)
print(catalog_data[:10])   

--> error seems related to a json file on the mast archive:
[...]
File ~/anaconda3/lib/python3.9/site-packages/requests/models.py:960, in Response.raise_for_status(self)
957 http_error_msg = u'%s Server Error: %s for url: %s' % (self.status_code, reason, self.url)
959 if http_error_msg:
--> 960 raise HTTPError(http_error_msg, response=self)

HTTPError: 422 Client Error: Unprocessable Entity for url: https://catalogs.mast.stsci.edu/api/v0.1/panstarrs/dr2/mean.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions