Skip to content
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 warning for SEVIRI native reader in case of bad data #2198

Merged
merged 2 commits into from Sep 5, 2022

Conversation

simonrp84
Copy link
Member

@simonrp84 simonrp84 commented Sep 1, 2022

On occasion, a SEVIRI native file contains bad data in which the digital counts in the file are invalid. This is not picked up by the reader as there's no quality checking.

This PR adds a check for the QQOV flag in the header. In cases where it is NOK a warning is raised to alert the user that the file is likely to contain bad quality data.

  • Tests added

@codecov
Copy link

codecov bot commented Sep 1, 2022

Codecov Report

Merging #2198 (f22274d) into main (a5573c1) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2198      +/-   ##
==========================================
+ Coverage   94.01%   94.07%   +0.05%     
==========================================
  Files         289      290       +1     
  Lines       44614    44667      +53     
==========================================
+ Hits        41945    42021      +76     
+ Misses       2669     2646      -23     
Flag Coverage Δ
behaviourtests 4.72% <0.00%> (-0.02%) ⬇️
unittests 94.73% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
satpy/readers/seviri_l1b_native_hdr.py 100.00% <ø> (ø)
satpy/readers/seviri_l1b_native.py 86.36% <100.00%> (+0.11%) ⬆️
satpy/tests/reader_tests/test_seviri_l1b_native.py 100.00% <100.00%> (ø)
satpy/utils.py 24.69% <0.00%> (-0.31%) ⬇️
satpy/tests/reader_tests/test_viirs_compact.py 100.00% <0.00%> (ø)
satpy/tests/test_cf_roundtrip.py 100.00% <0.00%> (ø)
satpy/tests/test_writers.py 98.99% <0.00%> (+0.02%) ⬆️
satpy/tests/test_readers.py 98.95% <0.00%> (+0.04%) ⬆️
satpy/readers/satpy_cf_nc.py 97.80% <0.00%> (+0.04%) ⬆️
satpy/readers/yaml_reader.py 97.50% <0.00%> (+0.22%) ⬆️
... and 6 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@coveralls
Copy link

coveralls commented Sep 1, 2022

Coverage Status

Coverage increased (+0.002%) to 94.682% when pulling f22274d on simonrp84:native_baddata_flag2 into 687494c on pytroll:main.

Copy link
Member

@mraspaud mraspaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for adding this. Just a couple of things.

satpy/tests/reader_tests/test_seviri_l1b_native.py Outdated Show resolved Hide resolved
satpy/tests/reader_tests/test_seviri_l1b_native.py Outdated Show resolved Hide resolved
@simonrp84
Copy link
Member Author

Both your comments should be addressed now @mraspaud

Copy link
Member

@mraspaud mraspaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mraspaud mraspaud merged commit 464d845 into pytroll:main Sep 5, 2022
@simonrp84 simonrp84 deleted the native_baddata_flag2 branch August 22, 2023 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:readers enhancement code enhancements, features, improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants