astropy/astroquery — pull request #256 by jwoillez (2013-11-21 14:11:43+00:00)
Title: Use Table as acceptable Vizier input

I have started resurrecting this Vizier feature. For now, you can do something like this:

>>> from astroquery.vizier import Vizier
>>> t = Vizier(catalog="VII/258/vv10").query_constraints(Vmag="6.0..10.0")[0]
>>> t.pprint()
Cl nR Name n_RAJ2000 RAJ2000 DEJ2000 l_z z Sp n_Vmag Vmag B-V r_z
--- --- ------------- --------- ---------- --------- --- ------ --- ------ ----- ----- ----
Q NPM1G+41.0135 O 06 55 10.0 +41 00 10 0.022 S? R 9.37 nan 988
A * NGC 3621 O 11 18 16.5 -32 48 51 0.002 S2 9.40 nan 2000
A NGC 4594 O 12 39 59.3 -11 37 23 0.002 S3 9.25 1.02 2456
>>> for u in Vizier(catalog="II/246", columns=["_1","_q","_r","*"]).query_region(t["RAJ2000","DEJ2000"], radius="10s"):
>>> u.pprint()
_1 _q _r RAJ2000 DEJ2000 _2MASS Jmag e_Jmag Hmag e_Hmag Kmag e_Kmag Qflg Rflg Bflg Cflg Xflg Aflg
--- --- ------ ---------- ---------- ---------------- ------ ------ ------ ------ ------ ------ ---- ---- ---- ---- ---- ----
-c 1 0.569 103.791864 41.002831 06551004+4100101 12.660 0.056 12.080 0.078 11.625 0.056 EEE 222 111 000 1 0
_1 _q _r RAJ2000 DEJ2000 _2MASS Jmag e_Jmag Hmag e_Hmag Kmag e_Kmag Qflg Rflg Bflg Cflg Xflg Aflg
--- --- ------ ---------- ---------- ---------------- ------ ------ ------ ------ ------ ------ ---- ---- ---- ---- ---- ----
-c 3 6.785 189.995616 -11.624275 12395894-1137273 13.358 0.022 10.061 nan 9.821 nan EUU 200 100 c00 2 0
-c 3 1.996 189.997638 -11.622945 12395943-1137226 10.141 0.121 9.291 0.130 8.573 0.064 EEE 222 111 000 2 0

The first Vizier query gets the AGNs in the Veron & Cetty catalog, with Vmag in the range [6, 10].
The second query passes to 2MASS the coordinates of the previous result. Each returned table returns the matches within 10 arcsec.