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

Revamp the interface for timestamps #351

Merged
merged 3 commits into from
Sep 27, 2023
Merged

Revamp the interface for timestamps #351

merged 3 commits into from
Sep 27, 2023

Conversation

jeremykubica
Copy link
Contributor

Fixes #350

Previously KBMOD stored the timestamps in multiple locations, providing the potential for out of sync data or other errors (especially as we allow changes at the RawImage level). This PR consolidates all of the timestamp storage in a single location. Specific aspects include:

  • Remove the (zero-based) timestamp array from ImageStack. This could easily get out of date.
  • Provide methods for accessing obstime or zeroed-time from ImageStack. Make them clearly named in terms of what they return.
  • Provide a function to build an array of zeroed timestamps from ImageStack (at linear cost). This is used in a few locations in the search stack and tests.
  • Also removes the ability to overwrite images in the ImageStack (only needed for testing before we changed the return policy).

Note that this PR involves a tradeoff of extra computing time in a few cases to avoid carrying around multiple copies of the timestamps.

@jeremykubica jeremykubica merged commit 78ff3cb into main Sep 27, 2023
1 check passed
@jeremykubica jeremykubica deleted the zeroed_time branch September 27, 2023 17:49
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.

Fix timestamp handling throughout KBMOD
2 participants