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

catalog option no longer working in VizieR #1237

Closed
rickyegeland opened this issue Sep 17, 2018 · 3 comments
Closed

catalog option no longer working in VizieR #1237

rickyegeland opened this issue Sep 17, 2018 · 3 comments

Comments

@rickyegeland
Copy link
Contributor

I am using astroquery 0.3.8. The catalog= parameter does not appear to be restricting the catalogs output by query_object() or query_region(). Here is an example adapted from the documentation:

>>> v = astroquery.vizier.Vizier(columns=["*", "+_r"], catalog="II/246")
>>> result = v.query_region("HD 226868", radius="20s")
>>> print(result)

Output:

TableList with 218 tables:
	'0:METAobj' with 6 column(s) and 7 row(s) 
	'1:ReadMeObj' with 6 column(s) and 7 row(s) 
	'2:I/61B/agk3' with 16 column(s) and 1 row(s) 
	'3:I/122/bd' with 10 column(s) and 1 row(s) 
	'4:I/131A/sao' with 12 column(s) and 1 row(s) 
...etc

I have tried several catalog= values and the result is the same. It seems the parameter is just being ignored.

@bsipocz bsipocz added the vizier label Sep 17, 2018
@keflavich
Copy link
Contributor

It looks like catalog is being overwritten by the query, which is incorrect behavior. Lines like this:

catalog = VizierClass._schema_catalog.validate(catalog)

should be

if catalog is not None:
    catalog = VizierClass._schema_catalog.validate(catalog)
else:
    catalog = self.catalog

or similar.

@bsipocz bsipocz added the bug label Sep 17, 2018
@jwoillez
Copy link
Member

@bsipocz I cannot reproduce this bug with the current version. Close?

@keflavich
Copy link
Contributor

Closing. Please open a new issue if you encounter this behavior again.

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

No branches or pull requests

4 participants