Skip to content
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

Reduce memory consuption by doing in place calculations #310

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hugobuddel
Copy link
Collaborator

@hugobuddel hugobuddel commented Dec 16, 2023

This PR reduces the memory consumption of a simple MICADO + SCAO + SPEC_15000x20 + detector_window simulation form 8.3 GB to 5.9 GB.

Might need some cleanup at some point.

Resulting pixel values are identical.

Comment on lines +114 to +115
#obj.hdu.data = new_image + bkg_level
obj.hdu.data -= bkg_level
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This used to be an addition and is now a subtraction? Also, what happened to new_image?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh sorry for wasting your time, I didn't run the test suite :-(

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happens to me as well sometimes 🙃

@hugobuddel hugobuddel marked this pull request as draft December 16, 2023 17:41
Base automatically changed from dev_master to main April 18, 2024 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

None yet

2 participants