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

OPSIM-1102: feature. sim_runner pre-allocates array to hold observations. #12

Merged
merged 2 commits into from
Nov 27, 2023

Conversation

yoachim
Copy link
Member

@yoachim yoachim commented Nov 27, 2023

Update sim_runner so it pre-allocates an array to hold observations. Results in a modest speedup, and makes it possible to keep the total memory footprint under 8 GB for a 10 year simulation.

@yoachim yoachim requested a review from ehneilsen November 27, 2023 20:47
Copy link
Collaborator

@ehneilsen ehneilsen left a comment

Choose a reason for hiding this comment

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

Looks fine.
I can imagine circumstances where using a nan might be a problem, for example if there are ever times when there might be an undefined RA, for example in the unlikely event that the telescope needs to track a quickly moving object (obviously not part of the main survey, but something that happens on telescopes). You could use counter in line 144 instead.

@yoachim yoachim merged commit d07bf6a into main Nov 27, 2023
6 of 7 checks passed
@rhiannonlynne rhiannonlynne deleted the tickets/OPSIM-1102 branch November 29, 2023 03:02
@rhiannonlynne rhiannonlynne changed the title Tickets/opsim 1102 OPSIM-1102: feature. sim_runner pre-allocates array to hold observations. Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants