-
Notifications
You must be signed in to change notification settings - Fork 11
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
Added possibility to save results #148
Conversation
Codecov Report
@@ Coverage Diff @@
## main #148 +/- ##
==========================================
+ Coverage 80.33% 81.15% +0.82%
==========================================
Files 10 11 +1
Lines 1144 1215 +71
==========================================
+ Hits 919 986 +67
- Misses 225 229 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
This PR is ready to be reviewed ; the only shortcoming here is that PSF and WCS are not saved with the blends as galsim and astropy do not provide utility functions to do it cleanly. Should we use something like pickle to save it anyway ? |
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.
Looks very good @thuiop, thanks for adding this functionality. Please see below for a couple of small requested changes and questions. It appears to me that it's really close to being ready for merge
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 agree with @ismael-mendoza, one should be more attentive to how the save_path
is constructed.
The way you wrote it, the user does not really have a choice for the filenames (probably a good thing), but it must have a choice of the main output directory then. If this is what you mean by save_path
then we should use pathlib
to construct the full paths.
Also it may be easier (we can discuss this) to create subdirectories inside the save_path
to put the various outputs, e.g. save_path/survey/blended.npy
rather than <save_path>_<survey>_blended.npy
. That way it is easier to check the directory existence rather than the existence of each file before loading.
Co-authored-by: Ismael Mendoza <[email protected]>
Co-authored-by: Alexandre Boucaud <[email protected]>
Co-authored-by: Alexandre Boucaud <[email protected]>
I should have addressed all the comments. |
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 think this is ready to merge after the CI passes and if my commit suggestions below are indeed what you intended.
Co-authored-by: Ismael Mendoza <[email protected]>
Co-authored-by: Ismael Mendoza <[email protected]>
Co-authored-by: Ismael Mendoza <[email protected]>
Co-authored-by: Ismael Mendoza <[email protected]>
Thanks for resolving the merge conflicts @thuiop. Merging now - |
Closes #142
I still have to add utility functions for loading the saved results easily.