-
-
Notifications
You must be signed in to change notification settings - Fork 405
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
Unfriendly Simbad.query_criteria functionality #2041
Comments
My thinking would be to provide a way to add criteria to the usual API methods, e.g.
to query for stars, rather than forcing you to use |
Hi there, I'm working on query criteria now and would like to pick your minds. I like a lot brigitta's idea but what about different operators than I was thinking to introduce a Criteria dataclass (or named tuples I don't know what is more in astroquery's philosophy). Maybe something along: from dataclasses import dataclass
from typing import Any
@dataclass
class Criteria:
column: str
operator: str
value: Any
logic = 'AND'
Criteria('ra', '<=', '10')
Then it would be called like this : query_region(coord, Criteria('otype', '!=', 'Cl*')) (where the signature of query_region would be Would that be more friendly? |
I wonder how much of this scenario gets resolved with #2856 getting merged, practically asking users to write ADQL queries for the more complicated ones. |
I think it's a bit different from adding the possibility to do tap. It'd be a way to do moderately intricate queries (a few joins / criteria only) for the non adql-proficient users A kind of replacement for the current query_criteria that is bound to disapear (could be deprecated for a few more years but sim-script is not maintained upstream so the current bugs and missing features will stay as they are) The idea is to add this feature when doing the rewrite of #1468 |
I either can't figure out how to, or the functionality for it isn't there but using
Simbad.query_criteria
wants me to pass full strings of my queries and will not accept SkyCoords. Currently the documentation shows these two usage cases:Could it be possible to add some friendliness to how this is scripted for some of the easier criterion operators such as
region
? For example:Or something similar?
The text was updated successfully, but these errors were encountered: