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

Update AGRI for fill values and cailbration LUTs. #2276

Merged
merged 2 commits into from Nov 14, 2022

Conversation

simonrp84
Copy link
Member

@simonrp84 simonrp84 commented Nov 14, 2022

I noticed that the Fengyun-4 readers were not correctly dealing with the fill value, which led to deep space pixels being shown as very bright (as the raw data fill value was 65535) instead of being filled.

This PR correctly applies the fill value. It also updates the selection of the IR calibration LUT from the file, as in some cases the table was stored under Calibration/ and in other cases it's stored under /.

  • Tests added

@codecov
Copy link

codecov bot commented Nov 14, 2022

Codecov Report

Merging #2276 (c069950) into main (3f53644) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #2276   +/-   ##
=======================================
  Coverage   94.30%   94.30%           
=======================================
  Files         306      306           
  Lines       46039    46043    +4     
=======================================
+ Hits        43416    43421    +5     
+ Misses       2623     2622    -1     
Flag Coverage Δ
behaviourtests 4.62% <0.00%> (-0.01%) ⬇️
unittests 94.94% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
satpy/readers/fy4_base.py 99.31% <100.00%> (+0.70%) ⬆️
satpy/tests/reader_tests/test_agri_l1.py 100.00% <100.00%> (ø)

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 Nov 14, 2022

Coverage Status

Coverage increased (+0.003%) to 94.894% when pulling c069950 on simonrp84:fengyun_fix into 3f53644 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, just a couple of comments.

satpy/readers/fy4_base.py Outdated Show resolved Hide resolved
lut = self.get(lut_key)
if lut is None:
lut_key = f'Calibration/{ds_info.get("lut_key", ds_name)}'
Copy link
Member

Choose a reason for hiding this comment

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

This isn't tested, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it should be tested - the test_ghi_l1.py file has the cal coefficients stored under Calibration/. Coverage says it's covered too, so that line must be getting called :)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants