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))
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?