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

SEVIRI IR calibration #105

Merged
merged 9 commits into from
Feb 10, 2025

Conversation

ninahakansson
Copy link
Collaborator

@ninahakansson ninahakansson commented Dec 19, 2024

Use external IR calibration from json files.

@coveralls
Copy link

coveralls commented Dec 19, 2024

Pull Request Test Coverage Report for Build 13200241166

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 28 of 29 (96.55%) changed or added relevant lines in 3 files are covered.
  • 21 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.2%) to 78.477%

Changes Missing Coverage Covered Lines Changed/Added Lines %
level1c4pps/seviri2pps_lib.py 1 2 50.0%
Files with Coverage Reduction New Missed Lines %
level1c4pps/tests/test_viirs2pps.py 2 84.21%
level1c4pps/init.py 7 85.78%
level1c4pps/viirs2pps_lib.py 12 48.15%
Totals Coverage Status
Change from base Build 12372197481: 0.2%
Covered Lines: 1673
Relevant Lines: 2086

💛 - Coveralls

Copy link
Contributor

@BengtRydberg BengtRydberg 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 to me. I added some comments that could improve the readability and testing.

@@ -164,4 +191,9 @@ def _microwatts_to_milliwatts(microwatts):
time=time)
coefs[channel] = {'gain': gain, 'offset': offset}

for channel in ('IR_039', 'IR_087', 'IR_108', 'IR_120',
'IR_134', 'IR_097', 'WV_062', 'WV_073'):
gain, offset = ir_calib_eumetsat(platform=platform, channel=channel,
Copy link
Contributor

Choose a reason for hiding this comment

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

no need to define gain and offset, just do
coefs[channel] = ir_calib_eumetsat(platform=platform, channel=channel,

But why is this piece of code present here at all within the __main__ part of the module. Seems like a leftover of some manual testing to me?

@@ -74,6 +75,15 @@ def get_calibration(platform, time, clip=False):
time=time,
clip=clip
)
if path_to_external_ir_calibration is not None:
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe make more sense to create the full file path after this line, then in function that is called?

@ninahakansson ninahakansson marked this pull request as ready for review February 7, 2025 12:22
Copy link

codecov bot commented Feb 7, 2025

Codecov Report

Attention: Patch coverage is 89.65517% with 3 lines in your changes missing coverage. Please review.

Project coverage is 76.22%. Comparing base (ce58b7d) to head (14e25db).
Report is 44 commits behind head on main.

Files with missing lines Patch % Lines
level1c4pps/calibration_coefs.py 90.47% 1 Missing and 1 partial ⚠️
level1c4pps/seviri2pps_lib.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #105      +/-   ##
==========================================
- Coverage   76.59%   76.22%   -0.37%     
==========================================
  Files          23       23              
  Lines        1726     1775      +49     
  Branches      159      162       +3     
==========================================
+ Hits         1322     1353      +31     
- Misses        359      379      +20     
+ Partials       45       43       -2     
Flag Coverage Δ
unittests 76.22% <89.65%> (-0.37%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ninahakansson ninahakansson merged commit 5b4c9d1 into foua-pps:main Feb 10, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include new EUMETSAT IR calibration for SEVIRI
3 participants