Add the METimage instrument definition - #245
Conversation
METimage (VII) on Metop-SG-A is a whisk-broom scanner recording 24 lines per sweep of its rotating telescope, so it fits MultiLineWhiskbroomScan directly. The geometry comes from the EPS-SG VII L1B product format specification (3144 across-track samples, 24 along-track samples per scan) and from the instrument description (1.729 s per revolution at constant scan angle, 0.6 mrad IFOV, 108 degrees of Earth view). Without this, trollsched fails with an AttributeError when computing a METimage swath boundary, as it looks the instrument up by name in pyorbital.geoloc_instrument_definitions.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #245 +/- ##
==========================================
+ Coverage 92.17% 92.29% +0.11%
==========================================
Files 19 19
Lines 4127 4190 +63
==========================================
+ Hits 3804 3867 +63
Misses 323 323
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Manny7717
left a comment
There was a problem hiding this comment.
Verified on head 206d42e vs base origin/main 3840769.
Purpose confirmed. geoloc_instrument_definitions previously had no METimage entry, so trollsched's swath-boundary lookup by instrument name would AttributeError (as the PR body states). The new metimage()/metimage_edge_geom() + METIMAGE_SCAN (MultiLineWhiskbroomScan) close that gap.
Geometry is internally consistent and matches the cited sources. Numbers cross-check: 108° Earth view / 3144 pixels = 0.6 mrad/pixel (matches the documented IFOV); scan half-angle (pixels−1)/2 steps ≈ 53.98°; pixel dwell time = sweep time / pixels where sweep time = 1.729 s × 108/360 (constant scan rate); along-track step = same sampling step (square pixels, 24 lines/scan). All are documented with the EPS-SG VII spec + Cao/Bruens references in the header.
Regression-proven. The 6 new tests (shape, ±54° swath edges, edge-to-edge 108°, 0.6 mrad IFOV cross-check, scan timing 108/360 fraction + full-revolution scan spacing, and a real geolocation of the edge geometry with a Metop-A TLE landing ~2800 km swath at zero altitude) all FAIL on base (6 failed — no metimage symbol) and PASS on head (6 passed).
Zero regressions. Full test_geoloc.py: head 115 passed / 1 skipped vs base 109 passed / 1 skipped — delta is exactly the 6 new tests, identical skip, no failures on either side. ruff (v0.16.1, repo pre-commit pin) clean on both changed files.
Non-blocking notes: (1) metimage_edge_geom hardcodes np.array([0, _METIMAGE_PIXELS - 1]) instead of reading pixel 1 as "left" via the scan's own convention, but the sign convention is asserted in the tests (cross_track[0] > 0) so drift would be caught; (2) the module-level scan objects pattern matches the existing viirs/modis style, so no new pattern introduced.
METimage (VII) on Metop-SG-A is a whisk-broom scanner recording 24 lines per sweep of its rotating telescope, so it fits MultiLineWhiskbroomScan directly. The geometry comes from the EPS-SG VII L1B product format specification (3144 across-track samples, 24 along-track samples per scan) and from the instrument description (1.729 s per revolution at constant scan angle, 0.6 mrad IFOV, 108 degrees of Earth view).
Without this, trollsched fails with an AttributeError when computing a METimage swath boundary, as it looks the instrument up by name in pyorbital.geoloc_instrument_definitions.