Skip to content
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

Add Additional Tables to the Lasair query options #1084

Open
Tracked by #832
jchate6 opened this issue Oct 21, 2024 · 1 comment
Open
Tracked by #832

Add Additional Tables to the Lasair query options #1084

jchate6 opened this issue Oct 21, 2024 · 1 comment
Labels
Data Services Data Services enhancement New feature or request Rubin SSSC Solar System Science Collaboration Work User Issue Raised by a user

Comments

@jchate6
Copy link
Contributor

jchate6 commented Oct 21, 2024

The user should be able to include additional tables, especially in the SQL Query search.

This is spun off from a conversation attached to

@github-project-automation github-project-automation bot moved this to Triage in TOM Toolkit Oct 21, 2024
@jchate6 jchate6 added enhancement New feature or request Data Services Data Services User Issue Raised by a user Rubin SSSC Solar System Science Collaboration Work labels Oct 21, 2024
@jchate6
Copy link
Contributor Author

jchate6 commented Oct 21, 2024

From @ms1228:

I am working with SAGUARO group and trying to run Lasair query in the SAGUARO TOM. This part of the code should be in: https://github.com/TOMToolkit/tom_base/blob/dev/tom_alerts/brokers/lasair.py
From what I have seen, it looks like the sql query in the TOM doesn't allow me to call things like Sherlock classification that is available in Lasair. Is there some way to add additional query information that is used in Lasair? Here is a sample query I am trying to run:
objects.objectId=sherlock_classifications.objectId AND objects.objectId=watchlist_hits.objectId AND watchlist_hits.wl_id=1 AND watchlist_hits.name=crossmatch_tns.tns_name AND sherlock_classifications.classification not in ("VS", "BS", "CV", "AGN") AND objects.ncandgp > 1 AND objects.jdmin > JDNOW() - 45 AND objects.g_minus_r < 0.5 AND ((objects.dmdt_r < -0.25) OR (objects.dmdt_g < -0.25) OR (objects.dmdt_r > 0.25) OR (objects.dmdt_r > 0.25)) AND ((objects.dmdt_r_err < 0.1) OR (objects.dmdt_g_err < 0.1)) AND objects.objectId NOT LIKE "ZTF17%" AND objects.objectId NOT LIKE "ZTF18%" AND objects.objectId NOT LIKE "ZTF19%" AND objects.objectId NOT LIKE "ZTF20%" AND objects.objectId NOT LIKE "ZTF21%" AND objects.objectId NOT LIKE "ZTF22%"

Response from @jchate6:

Right now, the only table we search is the objects table. Your query includes references to both the sherlock_classifications and the crossmatch_tns tables. If you are up for it, and want to give us a hand, we would really appreciate it if you could help us add the functionality we're missing to lasair.py and make a Pull Request.

There is a description of how to use the query API and a full list of schema that can be used in the query.

@jchate6 jchate6 moved this from Triage to Backlog in TOM Toolkit Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Data Services Data Services enhancement New feature or request Rubin SSSC Solar System Science Collaboration Work User Issue Raised by a user
Projects
Status: Backlog
Development

No branches or pull requests

1 participant