Skip to content

Add support to take bounding box info from metadata passed from the level-1 reader#724

Draft
adybbroe wants to merge 2 commits into
pytroll:mainfrom
adybbroe:use-bbox-metadata-passed-from-file
Draft

Add support to take bounding box info from metadata passed from the level-1 reader#724
adybbroe wants to merge 2 commits into
pytroll:mainfrom
adybbroe:use-bbox-metadata-passed-from-file

Conversation

@adybbroe
Copy link
Copy Markdown
Contributor

Add support to take bounding box info from metadata in the area object instead of calculating it from the geolocation data

  • Closes #xxxx
  • Tests added
  • Tests passed
  • Fully documented

… instead of calculating it from the geolocation data

Signed-off-by: Adam.Dybbroe <a000680@c22526.ad.smhi.se>
@adybbroe adybbroe added the PCW Pytroll Contributors' Week label May 20, 2026
Comment thread pyresample/geometry.py Outdated
Comment on lines +945 to +950
mask = thelons.notnull().compute()
thelons = thelons.where(mask, drop=True)

thelats = self.lats[:, int(cols / 2)]
thelats = thelats.where(thelats.notnull(), drop=True)
mask = thelats.notnull().compute()
thelats = thelats.where(mask, drop=True)
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.

It would be good to do the compute at the same time like thelons, thelats = da.compute(thelons.notnull(), thelats.notnull()). That way any shared computation tasks are only run once.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

❌ Patch coverage is 51.72414% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.59%. Comparing base (3b1287b) to head (71e2862).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
pyresample/geometry.py 51.72% 14 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #724      +/-   ##
==========================================
- Coverage   93.66%   93.59%   -0.07%     
==========================================
  Files          89       89              
  Lines       13707    13735      +28     
==========================================
+ Hits        12838    12855      +17     
- Misses        869      880      +11     
Flag Coverage Δ
unittests 93.59% <51.72%> (-0.07%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 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.

Signed-off-by: Adam.Dybbroe <a000680@c22526.ad.smhi.se>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement PCW Pytroll Contributors' Week

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants