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

astroquery.vizier does not return all the columns specified #2141

Closed
Gabriel-p opened this issue Aug 25, 2021 · 2 comments
Closed

astroquery.vizier does not return all the columns specified #2141

Gabriel-p opened this issue Aug 25, 2021 · 2 comments

Comments

@Gabriel-p
Copy link

Gabriel-p commented Aug 25, 2021

I've stumbled across #1502 which was apparently never truly resolved, so I'm opening it again. Example code:

import astropy.coordinates as coord
import astropy.units as u
from astroquery.vizier import Vizier
import astroquery
print(astroquery.__version__)
# 0.4.1

cat = 'I/350/gaiaedr3'
cent = (100, 50)
columns = [
    '_x', '_y', 'EDR3Name', 'RA_ICRS', 'DE_ICRS', 'Source', 'Plx',
    'e_Plx', 'PM', 'pmRA', 'e_pmRA', 'pmDE', 'e_pmDE', 'FG', 'e_FG',
    'Gmag', 'e_Gmag', 'FBP', 'e_FBP', 'BPmag', 'e_BPmag', 'FRP', 'e_FRP',
    'RPmag', 'e_RPmag', 'BP-RP']

v = Vizier(row_limit=-1, columns=columns)

result = v.query_region(coord.SkyCoord(
    ra=cent[0], dec=cent[1], unit=(u.deg, u.deg), frame='icrs'),
    width='.1deg', catalog=[cat])
data = result[cat]

print(len(data.keys()))
# 16

The workaround mentioned here RadioAstronomySoftwareGroup/pyradiosky#105

The work around is to download all the columns and then remove the ones we don't need. This is not ideal because it makes the download much slower, but seems to be required

is not feasible when the requested area is too large, because Vizier will simply return an incomplete region.

@keflavich
Copy link
Contributor

I can't reproduce this. With exactly your code, I get:

>>> print(astroquery.__version__)
0.4.3

>>> print(len(data.keys()))
26

and

In [14]: data
Out[14]:
<Table length=132>
    _x        _y              EDR3Name               RA_ICRS         DE_ICRS           Source          Plx      e_Plx      PM       pmRA    e_pmRA     pmDE   ...    Gmag     e_Gmag      FBP        e_FBP      BPmag    e_BPmag      FRP        e_FRP      RPmag    e_RPmag    BP-RP
   deg       deg                                       deg             deg                             mas       mas    mas / yr  mas / yr mas / yr  mas / yr ...    mag       mag        e-/s        e-/s       mag       mag        e-/s        e-/s       mag       mag       mag
 float64   float64             str29                 float64         float64           int64         float64   float32  float64   float64  float32   float64  ...  float64   float64    float32     float32    float64   float64    float32     float32    float64   float64   float64
--------- --------- ---------------------------- --------------- --------------- ------------------ ---------- ------- --------- --------- -------- --------- ... --------- --------- ----------- ----------- --------- --------- ----------- ----------- --------- --------- ---------
 0.049445 -0.043271 Gaia EDR3 991176575293154944 100.07686235195  49.95669816075 991176575293154944     1.2519  0.6235     1.391     0.902    0.588    -1.059 ... 20.268463  0.006476       66.54       7.157 20.780811  0.116812         124       9.306 19.514210  0.081559  1.266602

Upgrade to astropy 0.4.3 and try again?

@Gabriel-p
Copy link
Author

Works now:

0.4.3
WARNING: UnitsWarning: Unit 'e' not supported by the VOUnit standard.  [astropy.units.format.vounit]
26

Not sure what it was but it seems to be fixed now, so closing. Thank you!

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

3 participants