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 AHI HSD calibration coefficients #1908

Merged
merged 3 commits into from Dec 7, 2021
Merged

Conversation

simonrp84
Copy link
Member

Currently, the AHI HSD reader uses the default calibration coefficients for VIS channels: gain_count2rad_conversion and offset_count2rad_conversion in Block 5 of the header.
However, updated calibration coefficients are available in Block 6 of the header: cali_gain_count2rad_conversion and cali_offset_count2rad_conversion.

This PR switches from using the old coefficients by default to using the new ones by default.

In addition, this PR removes the clipping of negative radiances. In the current main branch any radiances below zero are automatically set to zero. This is undesirable as negative radiances are useful for analysing sensor noise, amongst other things, so I remove this unnecessary clipping.
There is also clipping for the reflectance values, but I've left that in for further discussion.

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.

Tests are failing, otherwise lgtm

Copy link
Member

@sfinkens sfinkens left a comment

Choose a reason for hiding this comment

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

Thanks, makes sense to use the latest coefficients! Can you please also update in the docs that this is the new default?

Regarding radiance clipping: Although I agree that clipping should at least be optional, maybe we should wait for a decision in #1911?

@codecov
Copy link

codecov bot commented Dec 3, 2021

Codecov Report

Merging #1908 (3b3cd59) into main (85656a8) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1908      +/-   ##
==========================================
- Coverage   93.41%   93.41%   -0.01%     
==========================================
  Files         275      275              
  Lines       40732    40730       -2     
==========================================
- Hits        38048    38046       -2     
  Misses       2684     2684              
Flag Coverage Δ
behaviourtests 4.82% <0.00%> (+<0.01%) ⬆️
unittests 93.97% <100.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
satpy/tests/reader_tests/test_ahi_hsd.py 100.00% <ø> (ø)
satpy/readers/ahi_hsd.py 97.29% <100.00%> (ø)
satpy/readers/fci_l1c_nc.py 97.93% <0.00%> (-0.05%) ⬇️
satpy/tests/reader_tests/test_fci_l1c_nc.py 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 85656a8...3b3cd59. Read the comment docs.

@coveralls
Copy link

coveralls commented Dec 3, 2021

Coverage Status

Coverage decreased (-0.0003%) to 93.905% when pulling 3b3cd59 on simonrp84:ahi_calib into 85656a8 on pytroll:main.

@simonrp84
Copy link
Member Author

Ok, it seems that the tests are complaining about coverage in an unaffected file. Odd. Anyway, AHI coverage remains the same.

Thanks for the pointer about documentation @sfinkens - I've updated the docs now.

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

@djhoese djhoese added component:readers enhancement code enhancements, features, improvements labels Dec 7, 2021
@djhoese djhoese merged commit b742249 into pytroll:main Dec 7, 2021
@simonrp84 simonrp84 deleted the ahi_calib branch December 7, 2021 21:15
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

5 participants