Skip to content

Limit METimage reader dimension search to specific groups - #3487

Merged
djhoese merged 1 commit into
pytroll:mainfrom
djhoese:feat-metimage-smart-dims
Nov 5, 2026
Merged

djhoese merged 1 commit into
pytroll:mainfrom
djhoese:feat-metimage-smart-dims

Conversation

@djhoese

@djhoese djhoese commented Sep 29, 2026

Copy link
Copy Markdown
Member

This is built on top of #3460 so only the most recent commit is actually involved here, but it is separate enough that I didn't want to include it in that PR. Once that PR is merged I'll rebase this one. This change would be too annoying to do in main and then update with the new PR.

The METimage reader does scan-based chunking. To do that it it used to look at all the dimensions in the file and then use only the sizes for the image arrays. This PR changes that to only use the typical group paths to find these dimensions. Claude confirmed that this should work for L1b and L2 files that I had available and @ameraner said L2 files should follow a similar structure.

  • Closes #xxxx
  • Tests added
  • Fully documented
  • Add your name to AUTHORS.md if not there already

@djhoese djhoese self-assigned this Sep 29, 2026
@codecov

codecov Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.45%. Comparing base (7a3ac60) to head (9d376d5).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3487   +/-   ##
=======================================
  Coverage   96.45%   96.45%           
=======================================
  Files         474      474           
  Lines       61291    61302   +11     
=======================================
+ Hits        59119    59130   +11     
  Misses       2172     2172           
Flag Coverage Δ
behaviourtests 3.46% <0.00%> (-0.01%) ⬇️
unittests 96.54% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This is an optimization and stops the entire file from being walked. Also update the L2 test fixtures to be more realistic.
@djhoese
djhoese force-pushed the feat-metimage-smart-dims branch from 167006f to 9d376d5 Compare November 5, 2026 18:19
@djhoese
djhoese marked this pull request as ready for review November 5, 2026 18:22
@djhoese
djhoese requested a review from mraspaud as a code owner November 5, 2026 18:22

@ameraner ameraner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks!

@djhoese
djhoese merged commit 50ea9ff into pytroll:main Nov 5, 2026
17 of 18 checks passed
@djhoese
djhoese deleted the feat-metimage-smart-dims branch November 5, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants