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 a median filter modifier #2521

Merged
merged 5 commits into from
Jun 28, 2023
Merged

Conversation

mraspaud
Copy link
Member

This PR adds a median filter modifier to allow de-noising.

  • Tests added
  • Fully documented

Example usage:

  median_filtered_chl_nn:
    standard_name: chl_nn
    compositor: !!python/name:satpy.composites.SingleBandCompositor
    prerequisites:
      - name: chl_nn
        modifiers:
          - median5x5

@mraspaud mraspaud added enhancement code enhancements, features, improvements component:compositors labels Jun 27, 2023
@mraspaud mraspaud self-assigned this Jun 27, 2023
@codecov
Copy link

codecov bot commented Jun 27, 2023

Codecov Report

Merging #2521 (d22e117) into main (bcd6581) will decrease coverage by 0.06%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2521      +/-   ##
==========================================
- Coverage   94.96%   94.91%   -0.06%     
==========================================
  Files         347      349       +2     
  Lines       50921    50969      +48     
==========================================
+ Hits        48358    48375      +17     
- Misses       2563     2594      +31     
Flag Coverage Δ
behaviourtests 4.31% <0.00%> (-0.01%) ⬇️
unittests 95.51% <100.00%> (-0.06%) ⬇️

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

Impacted Files Coverage Δ
satpy/modifiers/filters.py 100.00% <100.00%> (ø)
satpy/tests/modifier_tests/test_filters.py 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

@coveralls
Copy link

coveralls commented Jun 27, 2023

Pull Request Test Coverage Report for Build 5399683404

  • 38 of 38 (100.0%) changed or added relevant lines in 2 files are covered.
  • 34 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.06%) to 95.464%

Files with Coverage Reduction New Missed Lines %
satpy/writers/cf_writer.py 1 94.9%
satpy/tests/writer_tests/test_cf.py 33 95.53%
Totals Coverage Status
Change from base Build 5389825507: -0.06%
Covered Lines: 48488
Relevant Lines: 50792

💛 - Coveralls

satpy/modifiers/filters.py Outdated Show resolved Hide resolved
satpy/modifiers/filters.py Outdated Show resolved Hide resolved
Copy link
Member

@djhoese djhoese 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.

@mraspaud mraspaud merged commit 9b9e890 into pytroll:main Jun 28, 2023
@mraspaud mraspaud deleted the feature_median_filter branch June 28, 2023 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:compositors enhancement code enhancements, features, improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants