-
Notifications
You must be signed in to change notification settings - Fork 2
45 save intermediate files #82
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
Conversation
…itionally save the original images, sky-subtracted images, detection masks, and input (original) PSFs to dia_out_dir.
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.
I feel like I only half-understand the logic flow here of what determines when the images get written out. I think I expected more something that would wrap each step and then optionally write things out. My understanding (incomplete) of this PR is that it gathers all of the data files, keeps them in memory, and then writes them out again. That sounds like (a) a lot of memory usage; and (b) frustrating if the code crashes before it reaches the point where it writes out the intermediate files.
| ] | ||
| } | ||
| # Write the aligned images | ||
| for key in write_filepaths.keys(): |
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.
Does waiting until here mean that all the steps have to have been successful to get any of the images to be written out?
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.
Only for the portions on GPU.
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.
Add a test that exercises these functionality. Somewhere in this repo or in examples at least to capture it.
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.
A little philosophy here, but I'd prefer the get_psf function to be simpler and not have to know about the config object and that rather the thing calling get_psf explicitly set save_file=True in the call if self.keep_itermediate is set.
I'm open to discussions, but I'd like to not end up where all functions have few arguments but have lots of implicit dependencies on the config object even having an attribute defined.
|
And no need to actually edit the commit, but "[Move intermediate file save location to /pscratch/sd/l/laldoroty..." should be "Move intermediate file save location to $SCRATCH/phrosty_intermediate" I was worried at first that you had hardcoded something. |
...I have no memory of typing this, where is it? |
…ermediate functionality
So.... in this specific case, |
This was in the git commit message. |
I'd like to separate things like "detailed configuration of PSF" from pipeline operational choices like whether or not to save an intermediate image. The former seems like a good reason to pass an object with a bunch of stuff, the later seems like an something that is a different kind of config . |
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.
I'm fine with this.
That's so weird. I definitely typed $SCRATCH/phrosty_intermediate. It must have interpreted $SCRATCH as the above hardcoded path. |
…files 45 save intermediate files e7d0c33
Yes, if you directly typed that on the command-line, e.g., |
Checked both keep_intermediate true and keep_intermediate false. Works.