-
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
Harmonize calibration in SEVIRI readers #1457
Harmonize calibration in SEVIRI readers #1457
Conversation
Use nominal calibration method instead of GSICS. Otherwise offset will be multiplied by gain.
ea9ca06
to
2e45029
Compare
👉 View analysis in DeepCode’s Dashboard | Configure the bot |
Codecov Report
@@ Coverage Diff @@
## master #1457 +/- ##
==========================================
+ Coverage 90.78% 90.87% +0.08%
==========================================
Files 241 241
Lines 35111 35113 +2
==========================================
+ Hits 31876 31908 +32
+ Misses 3235 3205 -30
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.
Very good work on refactoring all the calibration and tests into a common ground for the various seviri reader! I have a few style comment, but otherwise LGTM!
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, thanks for the comprehensive overhaul of the tests!
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.
Looks very good to me! Thanks for sorting this out.
PS: first time I see np.choose
being used, nice!
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.
looks good to me! very nice restructuring, the logic is a lot easier to follow now. thanks a lot for putting in the effort on sorting this out!
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.
Nice work, @sfinkens! I have two relatively minor comments, otherwise all looks good.
Furthermore, add HRV calibration tests
Check if they are zero instead of checking the channel name.
Looks like the |
Yes, because there is a check in the ImageBoundaries class to make sure that the image boundaries are valid. So there should be no risk that these variables are undefined. We agreed on that this solves the problem, but that the bots cannot follow the solution. |
This is also a good place for the common documentation.
This reverts commit dfb9d73.
- Move common documentation to seviri_base module Main documentation: - Create separate section for SEVIRI L1.5 readers - Include seviri_base as well as all L1.5 readers
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.
Looks great, thanks for adding the docstrings to the main documentation.
Harmonize calibration in the SEVIRI HRIT, Native and netCDF format readers:
ext_calib_coefs
kwarg for external calibration coefficients. Switching between nominal and GSICS calibration mode is possible for HRIT and Native. netCDF files only provides one set of coefficients.SEVIRICalibrationAlgorithm
which provides the fundamental calibration algorithmsSEVIRICalibrationHandler
which handles selection of calibration coefficients and calls the appropriatecalibration algorithm.
get_dataset
to a dedicatedcalibrate
method, which uses_get_calib_coefs
to read coefficients from the file and passes them to the calibration handler. The file handlers do not inherit from the calibration class anymore. That resolves the problem of the calibration class expecting the file handler to set certain attributes (for example Standardise self.mda for SEVIRI attributes #722).In order to ensure code integrity, comprehensive calibration tests have been added before refactoring.
TODO:
flake8 satpy