HIT L3: moved 10-minute chunking transformation to HIT L2 - #161
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), |
There was a problem hiding this comment.
Since L2 is also being updated, the issue raised by this comment is a red herring.
There was a problem hiding this comment.
Although the test data that's checked in to the repo will need to be updated.
|
This all looks good once the l2 test file is updated so that the HIT integration test can pass. |
85e5e6e to
65a1389
Compare
|
@pleasant-menlo @jtniehof I updated the L2 file. The HIT integration test is passing. Let me know if there's anything else to be done in this PR. |
jtniehof
left a comment
There was a problem hiding this comment.
I'm good here. Will be out of pocket for the day, so going to go ahead and merge now and we can patch up any concerns later.
82b1e48
into
IMAP-Science-Operations-Center:main
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.