Change MAX_FINE_TIME to a constant value and fix time conversion#3113
Open
alastairtree wants to merge 4 commits intoIMAP-Science-Operations-Center:devfrom
Open
Change MAX_FINE_TIME to a constant value and fix time conversion#3113alastairtree wants to merge 4 commits intoIMAP-Science-Operations-Center:devfrom
alastairtree wants to merge 4 commits intoIMAP-Science-Operations-Center:devfrom
Conversation
Collaborator
Author
|
pre-commit.ci autofix |
tmplummer
reviewed
Apr 30, 2026
| """ | ||
| # Add whole seconds to coarse time | ||
| coarse = self.coarse_time + floor(seconds) | ||
| # fine time is 1/65535th of a second |
Contributor
There was a problem hiding this comment.
Can you please also update this comment.
| ] | ||
|
|
||
| MAX_FINE_TIME = np.iinfo(np.uint16).max # maximum 16 bit unsigned int | ||
| MAX_FINE_TIME = 65536 # maximum 16 bit unsigned int |
Contributor
There was a problem hiding this comment.
It looks like this constant is used in other places in mag_l1a_data.py. Can you confirm that for all uses, this change to the value is correct?
maxinelasp
approved these changes
May 4, 2026
Contributor
|
@alastairtree I'm happy to merge once the tests are failing and you're ready. It looks like the L1B validation uses the code you updated to calculate the expected L1A timestamps from the input files... if that's annoying for you to update, let me know and I can fix the tests. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2464 - go there for in depth discussion