Skip to content

Change reader and component names from "VII" to "METimage" and fix minor issues - #3395

Merged
mraspaud merged 17 commits into
pytroll:mainfrom
ameraner:change_metimage_name
Aug 4, 2026
Merged

Change reader and component names from "VII" to "METimage" and fix minor issues#3395
mraspaud merged 17 commits into
pytroll:mainfrom
ameraner:change_metimage_name

Conversation

@ameraner

@ameraner ameraner commented May 19, 2026

Copy link
Copy Markdown
Member

This PR

  • changes the name of the METimage instrument reader from vii_l1b_nc and vii_l2_nc to metimage_l1b_nc and metimage_l2_nc. The old reader names are put in deprecation (they still work but emit a FutureWarning). The python files and class names are adapted accordingly.
  • The platform name is translated to the OSCAR names (Metop-SG-AX)
  • With these fixes, the pyspectral RSR work correctly (from Add metimage average srf pyspectral#278 )

On top, two minor fixes are also implemented:

  • the longitude arrays are wrapped to the -180, 180 range to avoid failures in resampling corner cases
  • the yaml calibration configuration of one channel was faulty

... and the rows_per_scan attribute is added to datasets to support EWA resampling.

FYI @cesclc @TAlonglong @ludwigVonKoopa

@ameraner ameraner self-assigned this May 19, 2026
@ameraner
ameraner requested review from djhoese and mraspaud as code owners May 19, 2026 14:53
@ameraner ameraner added component:readers refactor PCW Pytroll Contributors' Week labels May 19, 2026
@ameraner ameraner moved this from Backlog to In review in PCW Spring 2026 May 19, 2026
@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.32%. Comparing base (fbfbe21) to head (454a95a).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3395      +/-   ##
==========================================
- Coverage   96.32%   96.32%   -0.01%     
==========================================
  Files         466      464       -2     
  Lines       59096    59081      -15     
==========================================
- Hits        56922    56907      -15     
  Misses       2174     2174              
Flag Coverage Δ
behaviourtests 3.59% <1.81%> (+<0.01%) ⬆️
unittests 96.40% <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.

@djhoese

djhoese commented Jul 10, 2026

Copy link
Copy Markdown
Member

@ameraner @mraspaud where are we with merging this pull request? Does it need to wait for something? Are there decisions that need to be made?

@ameraner

Copy link
Copy Markdown
Member Author

Hi Dave, from my side it's good to go/ready for review

@staticmethod
def wrap_longitude(longitude_array):
"""Wrap longitude between -180 and 180 degrees."""
longitude_array = ((longitude_array + 180) % 360) - 180

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.

This doesn't have to be worked on in this PR, but I think in some work I did a long time ago on another reader or maybe in pyresample I found that it was actually faster and fewer dask tasks overall to do a where operation on the condition of > 180 where lon - 360 is what is used if True. ...or whatever the correct math is.

@djhoese djhoese 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.

I haven't reviewed every little detail but this looks pretty good to me. It'd be great for one more review @mraspaud @pnuu @gerritholl or someone else.

@mraspaud
mraspaud merged commit c2fe0d3 into pytroll:main Aug 4, 2026
17 of 18 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in PCW Spring 2026 Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:readers PCW Pytroll Contributors' Week refactor

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Rename VII readers and update VII readers for new test data

3 participants