Skip to content

Conversation

@keflavich
Copy link
Contributor

I discovered astroquery yesterday and I think it is a great tool for me. However, I failed to reproduce the example in the docs when selecting only certain columns from a catalog:

>>> v = Vizier(columns=['_RAJ2000', '_DEJ2000','B-V', 'Vmag', 'Plx'], column_filters={"Vmag":">10"}, keywords=["optical"])

>>> result = v.query_object("HD 226868", catalog=["NOMAD", "UCAC"])

>>> print result
TableList with 3 tables:
        '0:I/297/out' with 21 column(s) and 50 row(s) 
        '1:I/289/out' with 16 column(s) and 18 row(s) 
        '2:I/322A/out' with 26 column(s) and 10 row(s)

>>> print result[2]
 _RAJ2000   _DEJ2000   Vmag    UCAC4      RAJ2000   ...  Z   B   L   N   S 
   deg        deg      mag                  deg     ...                    
---------- ---------- ------ ---------- ----------- ... --- --- --- --- ---
299.572419  35.194234 15.986 626-088995 299.5724189 ...   0   0   0   1   0
299.580291  35.176889 13.274 626-089002 299.5802912 ...   1   0   0   3   0
299.582571  35.185225 14.863 626-089007 299.5825712 ...   0   0   0   1   0
299.594172  35.179995 14.690 626-089015 299.5941718 ...   0   0   0   1   0
299.601402  35.198108 14.644 626-089019 299.6014021 ...   1   0   0   0   0
299.617669  35.186999 14.394 626-089038 299.6176686 ...   1   0   0   1   0
299.561498  35.201693 15.687 627-087872 299.5614977 ...   0   0   0   3   0
299.570217  35.225663 14.878 627-087887 299.5702165 ...   0   0   0   3   0
299.601081  35.233338 13.170 627-087924 299.6010806 ...   1   0   0   1   0
299.617995  35.205864 13.946 627-087944 299.6179950 ...   1   0   0   1   0

Is this a bug or am I doing something wrong?

Thanks in advance for your help!

@keflavich
Copy link
Contributor

I can confirm this behavior. Given that it worked sometime in the past to generate documents, I believe this must have something to do with a change in how Vizier is treating the column request.

@keflavich
Copy link
Contributor

I've added a fix. @gracca, you can ignore the rest below, these are notes to myself.

It's tricky to debug this though since the GET version of the vizier request can't be used with column specification.

There is also an issue with the vizier remote tests now that I can reproduce by running the tests from the command line but not interactively. The 'HIP' column is missing from the hipparcos catalog, apparently.

keflavich added a commit that referenced this pull request Jan 1, 2015
astroquery.vizier not retrieving selected columns
@keflavich keflavich merged commit ad6c014 into astropy:master Jan 1, 2015
@gracca
Copy link
Author

gracca commented Jan 2, 2015

Many thanks for your work @keflavich & happy new year!!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants