-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a YAMLReader to pad segmented geo data #977
Conversation
Codecov Report
@@ Coverage Diff @@
## master #977 +/- ##
==========================================
- Coverage 87.1% 86.99% -0.12%
==========================================
Files 181 181
Lines 27635 27752 +117
==========================================
+ Hits 24072 24143 +71
- Misses 3563 3609 +46
Continue to review full report at Codecov.
|
I think everything else works, but when the first segment is missing there's a crash. With MSG/SEVIRI HRIT data: |
And when the first segment is missing from Himawari-8/AHI HRIT: |
The tests are failing because something in packages that Conda installs has changed. I've tested the padding and found it working for the following data:
Both saving directly as full disk data and resampling the data works, as long as even one segment is available. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool. I have a couple concerns about the naming. "Collection" seems like a very generic name for this. In the future I'd like to add a "tiled" reader, but the StackedAreaDefinition doesn't support this idea. This "Collection" reader only supports stacking segments, right? What do you think about a "Segmented" reader name or "Stacked"?
Also, this means that people always get a full disk sized array right? Is there a way users can disable this? Like what if they only provide the segments for the top half of the full disk? Could a keyword argument be added to the Reader?
Yeah, the data are always returned as full disk representations. I'll have a look at adding the kwarg, and how it would actually be used when creating the |
Yeah I think that should work. |
OK, disabling is now implemented. It needs to be done at load time: scn.load([10.8], pad_data=False) Unfortunately resampling when segments are missing is broken also in |
# Pad missing segments between the first available and expected | ||
area_defs = _pad_later_segments_area(file_handlers, dsid) | ||
if not pad_data: | ||
return _load_area_def(dsid, file_handlers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use super
and make a extra function ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because:
- it didn't need to be a method
@staticmethod
would've caused other problems- I couldn't get it to work with
super()
In short, this was the easiest and fastest way to get it to work 😁
This PR adds a class that knows how to pad segmented geo data
flake8 satpy