-
Notifications
You must be signed in to change notification settings - Fork 0
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
Tickets/dm 48561 #189
base: develop
Are you sure you want to change the base?
Tickets/dm 48561 #189
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like you replaced the query_criteria with a query_region and is doing the magnitude selection locally. This is probably going to be problematic, the idea of doing the query with a magnitude range and a catalog selection is that it reduces the load on Simbad, which has a maximum time for queries.
Can you implement the same logic as before with the updated library please?
"cat = HD" | ||
) | ||
|
||
# Execute the query_region asynchrnously |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, remove unnecessary comment.
Hi, I'm helping people doing the transition to the new SIMBAD API. In your case, the criteria on Instead, you can do: from astroquery.simbad import Simbad
simbad = Simbad()
simbad.add_votable_fields("V", "rvz_redshift", "ident")
simbad.query_region("0 0", radius="0.5deg", criteria = "V > 1.0 AND V < 15.0 AND ident.id LIKE 'HD %'")
See line 2 where the main ID does not satrt with Ident contains all the names of a source. In case you need it one day, here is the ADQL query corresponding to this search (to be called with -- output columns
SELECT ra, dec, main_id, allfluxes.V, id AS "HD_id", rvz_redshift AS "z"
FROM basic
-- we need to add fluxes and all identifiers
JOIN allfluxes ON allfluxes.oidref = oid
JOIN ident ON ident.oidref = oid
-- we want something from HD catalog
WHERE ident.id LIKE 'HD %'
-- criteria on magnitude
AND V < 15.0 AND V > 1.0
-- criteria on region
AND CONTAINS(POINT('ICRS', ra, dec), CIRCLE('ICRS', 10, 5, 3)) = 1 If you've got any issue or question with the new API, don't hesitate to tag me. Manon |
Hi Tiago,
With the release of astroquery 0.4.8, SIMBAD queries have changed significantly:
query_criteria
are now deprecated.ra
anddec
) are now returned in degrees.RA
andDEC
are now lowercase:ra
anddec
.I updated the
find_target_simbad
in this PR to align with these new defaults. Note that I haven't added backward compatibility with older astroquery versions, limiting the changes to a very straightforward implementation in thefind_target_simbad
method.Let me know if that is enough or if you need further changes.