Skip to content

Fix LightningTimeCompositor failing when data outside of the time range is passed #3057

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

Merged
merged 4 commits into from
Mar 21, 2025

Conversation

ameraner
Copy link
Member

This PR fixes the LightningTimeCompositor (implemented in #2895) that was causing failures when the input data contained lightning times outside of the time range.

The compositor was using drop=True when filtering lightnings outside the defined time_range. This was causing a mismatch in dimension between the lightning data array and the latitude/longitudes arrays due to the dropped entries, so that resampling operations were failing due to shape/chunks mismatch.

By removing drop=True also the explicit computation of the condition array could be removed.

On a side, this PR also reduces the handling of empty data from an error to a warning, and fixes some language/typos in the docstrings.

  • Tests added

@ameraner ameraner self-assigned this Feb 11, 2025
@ameraner ameraner added the bug label Feb 11, 2025
Copy link

codecov bot commented Feb 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.11%. Comparing base (da46066) to head (e6b5385).
Report is 91 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3057      +/-   ##
==========================================
- Coverage   96.11%   96.11%   -0.01%     
==========================================
  Files         383      383              
  Lines       55685    55680       -5     
==========================================
- Hits        53523    53518       -5     
  Misses       2162     2162              
Flag Coverage Δ
behaviourtests 3.89% <0.00%> (+<0.01%) ⬆️
unittests 96.21% <100.00%> (-0.01%) ⬇️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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 53372d4 into pytroll:main Mar 21, 2025
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants