-
Notifications
You must be signed in to change notification settings - Fork 0
Removed dev/null and reduced memory #189
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?
Conversation
wmwv
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.
Update changelog message to be more correct in its description in the updated context.
| @@ -0,0 +1 @@ | |||
| Reduced memory for blank images No newline at end of file | |||
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 changelog message.
| input_header["BAND"] = image_object.band | ||
| input_header["POINTING"] = image_object.pointing | ||
| input_header["SCA"] = image_object.sca | ||
| image_object.data = np.zeros((4088, 4088)) |
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.
These changes to simulation.py will trigger a merge conflict.
|
|
||
| image_object.data = None | ||
| image_object.noise = None | ||
| image_object.flags = None # These are meaningless, delete to save memory. |
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 this comment apply only to flags, or to data, noise, and flags?
| input_header["BAND"] = image_object.band | ||
| input_header["POINTING"] = image_object.pointing | ||
| input_header["SCA"] = image_object.sca | ||
| image_object.data = np.zeros((4088, 4088)) |
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.
Define 4088 somewhere as a variable and use that consistently.
Possibly something like
nx, ny = 4088, 4088
Blank images were being generated with large (4088x4088) arrays of zeros that were a waste of memory.
/dev/nulls and replaced them withNones as I was able to make those changes insnapplsimultaneously.This PR is dependent on snappl PR 81