-
Notifications
You must be signed in to change notification settings - Fork 0
Deep workflow #48
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
base: main
Are you sure you want to change the base?
Deep workflow #48
Conversation
wilsonbb
left a comment
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.
Left several comments about cleaning up code that was commented out or adding some clarifications. But mainly approving
| import time | ||
|
|
||
|
|
||
| #"ckpt_2gb_2cpus", "ckpt_2gb_2cpus", "astro_2gb_2cpus"]), |
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.
Nit: we can remove this
| import time | ||
|
|
||
|
|
||
| # "esci_48_8cpus" "astro_48_8cpus" |
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.
With comments like these, I would either remove them or just write out a quick one line comment about the executors
| ic = ImageCollection.read(ic_file) | ||
|
|
||
| ### Mask out images that we don't want or can not search through | ||
| # mask out poor weather images |
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.
Would probably fully remove these. Can add a comment explaining why we no longer do this if needed.
| #mask_zp = np.logical_and(ic["zeroPoint"] > 27 , ic["zeroPoint"] < 32) | ||
| #ic = ic[np.logical_and(mask_zp, mask_wcs_err)] | ||
|
|
||
| # mask out images with WCS error more than 0.1 arcseconds because we |
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.
Since we no longer apply all of the masking, do we want to remove this whole section?
| newx = result["x"]+dt*result["vx"] | ||
| newy = result["y"]+dt*result["vy"] | ||
| coord = wcs.pixel_to_world(newx, newy) | ||
| #pos.append(list(zip(coord.ra.deg, coord.dec.deg))) |
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.
Did this ever get fixed? If not, and we still need it maybe replace with a longer comment about what was wrong
| #pos.append(list(zip(coord.ra.deg, coord.dec.deg))) | ||
| #pos_valid.append(obs_valid) # NOTE TO SELF: FIX LATER | ||
|
|
||
| return coord, obs_valid #SkyCoord(pos), pos_valid |
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.
update return value.
drewoldag
left a comment
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.
This all looks ok to me. I'm not seeing anything overly frightening in here.
drewoldag
left a comment
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.
This all looks ok to me. I'm not seeing anything overly frightening in here.
Implements the DEEP Workflow used to analyze the single ccd single night search, but can be used to run on any set of image collections in a directory.
Additional log parsing and visualization functionality is provided.
Solution Description
Workflow
Running the Workflow is a multi-step process which includes additional preparation and cleanup work that executes at the
submit location:
staging_directorythat matchic_filename_patternThe config section that gives the directory, pattern and exclusion can look like:
The workflow writes to
logs,resampled_wus,resultsandplotsdirectories. There are two additional smaller workflows added - the one that just runs step2 and one that just runs postscript. These are mostly good for testing and short-cutting the entire workflow for debugging purposes.Running a KBMOD search is a 3 step process:
n_obsis the biggest discriminator for the data that is keptn_obstolen(ic)//2len(ic)gets below 50-60, this seems to be too strict of a requirementn_obsis pinned to 15wcs,mjd_midanduuidare guaranteedvisitanddetectordon't exist for everyImageCollectionThe config section for the step1 and postscript external resources can look like:
Logging
Logs can be quite complicated.
A single log file can have several starting and ending messages - because the jobs can be resubmitted. Often they are preempted with means they will have several initial messages and maybe one ending message.
A single task will output several log files - one per step.
Each
Logcan consist of multiple log files. For example the complete log of a Task20210101_Acan consist of multiplesteps called
20210101_A_step1,20210101_A_step2etc. thus making the full Log of the event a union of every step.Individual steps are parsed, extracting individual log entries and context; assigning to each log step a success, error and completion status:
Some functionality is pretty general -
parse_logfile, theLogclass and itsfmtstring, but contextualization depends heavily on the log content. This means much of the plotting colors etc. are affected too. To overwrite the default contextualization of the parsed logs override the_parse_singlemethod.Code Quality
The code is pretty shit, but at least it has documentation now and isn't duplicated across tasks.
There will be some wrestling with the default values in the repo right now, but that is at least approachable compared to the draft PR.