forked from jfrostburke/snex2
-
Notifications
You must be signed in to change notification settings - Fork 5
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
DRAFT - Implementing automatic download of templates for GW candidates #17
Open
gterreran
wants to merge
21
commits into
LCOGT:master
Choose a base branch
from
gterreran:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… GWTEMPLATES_FOLDER
…est is probably broken now
…e. Created run_template_search.py to wrap the template_query class and allow to pass a list of targets. Changed the input of template_query to store the info needed in the o4_galaxy table. Adopted the logging of SNEx2 for the queries.
…he template search will no longer be a hook, but will be called directly from the views.py. The run_template_search.py has also been updated to update the database.
… on updating pholco table, not tested. Working on DECam_search, still far from complete
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The implementation is not yet finished, that’s why this is a draft, but people can start review it. I’ll explain the gist of what has been done so far, and I’ll later explain what needs to be done.
The
gw/survey_queries
moduleThe core of the implementation is the new
survey_queries
module. All the hard coded stuff is included in the__init__.py
. These things include instrument names and specifications (like resolution and FOV). The functiongenerate_FOV_grid
is also included there. This function creates a grid of coordinates which will serve as a check to know if the entire FOV of LCO is covered by the final template.The module defines a
template_query
class, insidequery.py
. This is a survey-agnostic class, that will collect all the necessary info and distribute them to each specific survey query. The class will then gather the list of tiles from each survey, and then reproject and merge them. The path for each final template fits file is also stored in the class.Each survey-specific query (like
PanSTARRS_search.py
) will handle the actually query of the data, as well as the necessary steps to make the images ready to be used as templates.The
gw/run_template_search.py
fileThis file is basically just a wrapper for the whole process. A
template_query
object is created, then each survey is called.The
gw/views.py
andgw/hooks.py
editsPreviously, the databases were updated one object at a time. Now each target is included in a list and then all targets are uploaded in one go. This is done to favor a cleaner parallelization, so that only one process managing all downloads will be created.
What needs to be done
The downloading and reprojecting takes a lot of time. The
run_template_search
function is called inside theingest_gw_galaxy_into_snex1
function ingw/hooks.py
and will cause the function to hang, causing also the triggering of the observations to hang. In order to avoid that, the download needs to be run asynchronously. This has not been implemented yet, but TOM base has already some built functionalities to handle it and I am trying to apply them.New surveys will need to be added. DECam templates will be among the first to be included. The data are spread over numerous separate surveys and these are not all included in NOIRLab. A more accurate search for alternative endpoints needs to be done.
Finally, the templates need to be fully tested by the pipeline, which has not been done yet. They should be ok, but time will tell.