HIT L3: moved 10-minute chunking transformation to HIT L2 - #161
Open
leowerneck wants to merge 1 commit into
Open
HIT L3: moved 10-minute chunking transformation to HIT L2#161leowerneck wants to merge 1 commit into
leowerneck wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Moves HIT 10-minute macropixel consolidation from L3 to L2, addressing issue #143.
Changes:
- Removes L3 chunking logic and uses consolidated L2 data directly.
- Reads five-minute epoch deltas from L2 CDFs.
- Updates affected unit tests.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
imap_l3_processing/hit/l3/hit_processor.py |
Passes L2 data directly into processing. |
imap_l3_processing/hit/l3/utils.py |
Reads supplied epoch deltas. |
imap_l3_processing/hit/l3/sectored_products/science/sectored_products_algorithms.py |
Removes obsolete consolidation logic. |
tests/hit/l3/test_hit_processor.py |
Updates processor mocks and expectations. |
tests/hit/l3/test_utils.py |
Adds epoch-delta test data and assertions. |
tests/hit/l3/sectored_products/science/test_sectored_products_algorithms.py |
Removes obsolete transformation tests. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| return HitL2Data( | ||
| epoch=cdf["epoch"][...], | ||
| epoch_delta=fabricated_epoch_deltas, | ||
| epoch_delta=cdf["epoch_delta"][...] / 1e9 * timedelta(seconds=1), |
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.
Change Summary
Closes #143.
Overview
This PR removes HIT macropixel 10-minute chunk transformation from L3. The transformation and corrected epoch handling are now performed in L2 by
imap_processingPR 3377 that closes issue 3327 of that repository.L3 now consumes the corrected epochs, five-minute epoch deltas, and consolidated macropixel data directly from the L2 CDF.
File changes
imap_l3_processing/hit/l3/sectored_products/science/sectored_products_algorithms.pytransform_to_10_minute_chunks, which is now performed in L2.imap_l3_processing/hit/l3/hit_processor.pytransform_to_10_minute_chunks.dependencies.datadirectly because it now has the expected 10-minute format.imap_l3_processing/hit/l3/utils.pyepoch_deltadirectly from the L2 CDF and converts it from nanoseconds totimedeltavalues.tests/hit/l3/sectored_products/science/test_sectored_products_algorithms.pytest_transform_to_10_minute_chunksand its unused imports.tests/hit/l3/test_hit_processor.pytransform_to_10_minute_chunks.tests/hit/l3/test_utils.pyepoch_delta.Testing
Ran the affected HIT L3 unit tests:
uv run python -m unittest \ tests.hit.l3.sectored_products.science.test_sectored_products_algorithms \ tests.hit.l3.test_hit_processor \ tests.hit.l3.test_utilsAll 9 tests passed.