2

I try to make relatively large queries on the 2MASS catalogue with astroquery.vizier.VizierClass.query_region().

While it works for small areas, it fails for large area. Here is the code I use:

from astroquery.vizier import Vizier
import astropy.units as u
import astropy.coordinates as coord

twomass_query=Vizier(columns=["Jmag","Hmag","Kmag","e_Jmag","e_Hmag","e_Kmag","Qflg"],
                     catalog=["II/246/out"])
twomass_query.ROW_LIMIT = -1
twomass_query.TIMEOUT = 3600
table=twomass_query.query_region(
    coord.SkyCoord(ra=159.5, dec=-64.6, unit=(u.deg, u.deg), frame='icrs'),
    width=[10*u.deg,10*u.deg],
    return_type='asu-binfits')

I receive a long error meesage ending with:

ConnectionError: ('Connection aborted.', BadStatusLine("''",))

The syntax is correct since requesting a smaller box with e.g.

width=[3*u.deg,3*u.deg]

works fine.

I also tried to switch to another ViZieR server (vizier.cfa.harvard.edu) to rule out a pb on the server side but to my surprise it gave me a different error ending with:

ChunkedEncodingError: ('Connection broken: IncompleteRead(0 bytes read)', IncompleteRead(0 bytes read))
MSeifert
  • 145,886
  • 38
  • 333
  • 352
HBouy
  • 245
  • 3
  • 14
  • This might be an intrinsic limitation of the Vizier servers. I'll investigate further. – keflavich Jun 08 '16 at 22:12
  • Thanks! It could be, but I would be surprised. I know that for example [Scamp](http://www.astromatic.net/software/scamp) uses the Vizier servers as well and I routinely downloaded similarly large areas while using it. – HBouy Jun 09 '16 at 07:08
  • Could you raise this as an issue on astroquery? I can reproduce the failure, but I still don't understand it. – keflavich Jun 09 '16 at 09:33
  • Done! [Here](https://github.com/astropy/astroquery/issues/705) – HBouy Jun 09 '16 at 10:17

1 Answers1

1

I am now almost sure it is a bug of the VizieR server. I cannot execute the request on the Vizier webpage, it also returns an error or an empty table. The problem seems to be the requested output format (return_type='asu-binfits'). If I request a Votable then it works on the Vizier webpage, and with astroquery as well.

I have written to the CDS Helpdesk to notify the problem.

Hopefully they can fix it soon, as binary FITS tables are much faster to request (download) than ASCII votables! I suspect there is a way to request binary Votable? what is the corresponding return_type?

HBouy
  • 245
  • 3
  • 14