Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAST Catalogs.query_criteria fails with PanSTARRS #2716

Closed
bcarry opened this issue Apr 27, 2023 · 1 comment · Fixed by #2727
Closed

MAST Catalogs.query_criteria fails with PanSTARRS #2716

bcarry opened this issue Apr 27, 2023 · 1 comment · Fixed by #2727
Labels

Comments

@bcarry
Copy link

bcarry commented Apr 27, 2023

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

@bsipocz bsipocz added the mast label Apr 28, 2023
@bsipocz
Copy link
Member

bsipocz commented Apr 28, 2023

I suspect this is something upstream, cc @jaymedina

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants