Comments (5)
As I recall the original BlankResponseWarning
and then ugly parsing of the returned error/warning from the server was due to receiving a lot of bug reports where it was difficult to see what was going on (e.g. a response was returned, but we couldn't parse it out to a Table but instead gave an ugly traceback to the users. Anyway, none of these are necessary with the new backend, but still, having a warning for no results may be useful, and consistent with the rest of astroquery.
from astroquery.
Hi Laurent,
This method has changed since the last version. If you install from the master branch, the behavior is:
from astroquery.simbad import Simbad
from astropy.coordinates import SkyCoord, search_around_sky, Angle
import astropy.units as u
ra = 0
dec = -90
output_table= Simbad.query_region(SkyCoord(ra, dec,unit=(u.deg, u.deg), frame='icrs'), radius=0.01*u.arcsec)
print(output_table)
<Table length=0>
main_id ra dec coo_err_maj coo_err_min coo_err_angle coo_wavelength coo_bibcode
deg deg mas mas deg
object float64 float64 float32 float32 int16 str1 object
------- ------- ------- ----------- ----------- ------------- -------------- -----------
Which returns an empty table without any warning nor errors. What do you think about this new behavior?
from astroquery.
OK, I tried with the PIP distribution.
I close the issue.
from astroquery.
Ohhh. I haven't noticed the disappearance of the warning during the review. Can we reinstate e.g. a NoResultsWarning
, that we try to do for most cases with logically valid queries but empty responses?
from astroquery.
Ohhh. I haven't noticed the disappearance of the warning during the review. Can we reinstate e.g. a
NoResultsWarning
, that we try to do for most cases with logically valid queries but empty responses?
My reasoning behind removing the warning was that by looking through astroquery, when a NoResultsWarning
is emitted, the method most often returns None
instead of a table. Sometimes it returns a plain empty Table()
object without any columns, sometimes it returns the query parameters that lead to the empty response.
Here in SIMBAD, we return a valid table with zero rows but it contains at least the meta data of the columns that would have been returned. This can also be the expected result, for example when people do a ROW_LIMIT=0
or a TOP 0
query just to test their joins before sending a big query, or to check what columns are added by a votablefield, or to see if their ADQL syntax is correct (the server returns quite detailed warnings about the ADQL syntax).
So I guess when we add the warning back I'll filter these two cases just to be sure that it does not become annoying for these use cases?
from astroquery.
Related Issues (20)
- Splatalogue.query_lines() seems to be broken? HOT 2
- Slow Simbad.query_objects & IRSA.query_region searches HOT 6
- Use plot directive to generate figures
- modulate verbosity of astroquery.mast.Observations.download_products() HOT 1
- Add support for upload tables for queries in ALMA
- BUG: CI -- no space left on device HOT 2
- ESA Herschel download_data connection error HOT 2
- MAINT: retire/rename exceptions.TimeoutError in favour of requests
- TST: esasky tests take too long time and donwload too much data HOT 8
- BUG: alma test downloads 850+Mb of data HOT 8
- How to download Level 1 ancillary (*cbcd.fits and *cbunc.fits) from IRSA?
- Vizier.query_region() returns incorrect index for some catalog HOT 3
- CI: rerun failing tests at the end
- Bug in rows limitation in module vizier HOT 2
- Unexpected behavior when passing `obj_names` to `SDSS.query_region()`
- IRSA: adding SSA method HOT 1
- Astroquery.gaia API Error: RA cannot be converted to hour or hourangle. HOT 2
- MAST cloud dataset doesn't show level 3 data products
- SimbadClass got an unexpected keyword argument HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from astroquery.