-
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
Fix for missing attributes when requesting 'counts' calibration from ABI L1B reader. #1800
Conversation
As part of Pull Request pytroll#1692, we added an early return to abi_l1b.py's get_dataset method when the requested calibration is "counts". The problem is that the early return results in a number of missing attributes in the object returned from get_dataset. I also took the liberty of updating the unit tests to check for some of the missing attributes, as well as including a test for invalid calibration.
Should satisfy the pull request requirements.
Also adjusted the formatting of test_abi_l1b.py so that it'll conform with flake8 (and flake8-docstring).
Codecov Report
@@ Coverage Diff @@
## main #1800 +/- ##
=======================================
Coverage 92.92% 92.92%
=======================================
Files 265 265
Lines 39081 39092 +11
=======================================
+ Hits 36316 36328 +12
+ Misses 2765 2764 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Thanks @jon4than! |
…ABI L1B reader. (pytroll#1800) * Fix ABI L1B reader not returning expected attrs. As part of Pull Request pytroll#1692, we added an early return to abi_l1b.py's get_dataset method when the requested calibration is "counts". The problem is that the early return results in a number of missing attributes in the object returned from get_dataset. I also took the liberty of updating the unit tests to check for some of the missing attributes, as well as including a test for invalid calibration. * Add myself to AUTHORS.md. Should satisfy the pull request requirements. * Add explicit copy() of raw counts Also adjusted the formatting of test_abi_l1b.py so that it'll conform with flake8 (and flake8-docstring).
As part of Pull Request #1692, we added an early return to abi_l1b.py's get_dataset method when the requested calibration is "counts".
The problem is that the early return results in a number of missing attributes in the object returned from get_dataset.
I also took the liberty of updating the unit tests to check for some of the missing attributes, as well as including a test for invalid calibration.
As an aside, I agree with the logic for why it was decided to return early; the
self.nc['Rad']
values aren't radiances. That said, I couldn't think of a more straightforward way to write this code.AUTHORS.md
if not there already