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
Fixes to read VII testdata #1462
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1462 +/- ##
==========================================
+ Coverage 90.52% 90.58% +0.05%
==========================================
Files 238 239 +1
Lines 34153 34314 +161
==========================================
+ Hits 30916 31082 +166
+ Misses 3237 3232 -5
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
This looks good to me, just have a minor inline comment.
Just for my understanding, is this supposed to be backward compatible with older versions of the test dataset?
satpy/readers/vii_base_nc.py
Outdated
@@ -84,7 +84,7 @@ def get_dataset(self, dataset_id, dataset_info): | |||
variable = self._perform_interpolation(variable) | |||
|
|||
# Perform the calibration if required | |||
if dataset_info['calibration'] is not None: | |||
if dataset_info.get('calibration', None) is not None: |
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.
if dataset_info.get('calibration', None) is not None: | |
if dataset_info.get('calibration') is not None: |
None
is already the default return value for get
.
Also, should we issue a warning here if no calibration info is found?
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.
Already in the vii_l1b_nc.yaml we expect some datasets to not have calibration for example "observation_azimuth".
@mraspaud I did not try to make it compatible with old versions of testdata. I think the actual data is still the same and only the format is improved. |
OK, in this case should we also discard the old file pattern? |
I do not know, it might be an older version but could also be the correct pattern but someone else making the files. |
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.
LGTM
Modifications needed to read VII testdata generated 20200921212800.
flake8 satpy