-
-
Notifications
You must be signed in to change notification settings - Fork 396
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
Keep input coordinates and errors in table generated by Simbad.query_region
#2047
Comments
Simbad.region_query
Simbad.query_region
OK, so, the solution you mentioned is this: #496 (comment) I don't think what you're asking for is possible, though - it would require an upstream change, I think. You basically want your search coordinates as a return column, right? @aoberto any ideas? |
Thank you for your comment, Adam. Yes, I basically want the search coordinates as a return column, even better if not found coordinates are returned as a row with an special label (or simply None). |
Sorry, it does not look so simple to me. The difficulty I see here, it that coordinates are given through a SkyCoord object, so depending of the interpretation and the output format of the coordinates, it could be too risky to recognize exactly the given coordinates in the output comparing strings. Beside of that, errors are raised when no object are found. From now, I just added a column named 'SCRIPT_NUMBER_ID' which is the number (from 1) of the corresponding query array position. You do not have to add this field manually, it will always be inside the output. So you can group by this number to get results query by query. For instance :
Can you try it (do not forget to clean the cache), and tell me if it looks good to you or if some adjustments are needed. |
It looks fixed to me. Doing the query from the examples from astroquery.simbad import Simbad
import astropy.coordinates as coord
import astropy.units as u
result_table = Simbad.query_region(coord.SkyCoord(ra=[10, 11], dec=[10, 11],
unit=(u.deg, u.deg), frame='fk5'),
radius=0.1 * u.deg) returns
Can we close? Don't hesitate to ask again if it did not solve the issue |
Hello there! This situation is kinda related to #967. I was trying to perform a
Simbad.query_region
into a list of coordinates. I wanted to be able to keep the input related to each row (or the index) of the output, and it would be extremely helpful to have a error label too, in case of not finding an object with Simbad.I found out that there is an alternative with
typed_id
, but this option seems to work only withquery_objects
. Would it be possible to consider these features forquery_region
? I think there could be an alternative too withXMatch.query
, I partially reached my goal using XMatch directly with their web page.The text was updated successfully, but these errors were encountered: