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

Make sure a discrete data type is preserved through resampling #510

Merged
merged 4 commits into from Nov 23, 2018

Conversation

mraspaud
Copy link
Member

@mraspaud mraspaud commented Nov 21, 2018

This PR lets satpy resample discrete dataset without converting to float. Additionally, if a _FillValue attribute is available, that value is passed to pyresample for filling missing data pixels (typically outside of swath).

  • Tests added
  • Tests passed
  • Passes git diff origin/master -- "*py" | flake8 --diff
  • Fully documented

@mraspaud mraspaud added this to the v0.10 milestone Nov 21, 2018
@mraspaud mraspaud self-assigned this Nov 21, 2018
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.

Just a few "gotchas" that I think could be issues.

satpy/tests/test_resample.py Show resolved Hide resolved
satpy/resample.py Show resolved Hide resolved
@coveralls
Copy link

Coverage Status

Coverage increased (+0.4%) to 74.474% when pulling bc6ec5e on mraspaud:fix-dtype-preservation into 19e3f83 on pytroll:master.

@codecov
Copy link

codecov bot commented Nov 23, 2018

Codecov Report

Merging #510 into master will increase coverage by 0.34%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #510      +/-   ##
==========================================
+ Coverage   74.13%   74.47%   +0.34%     
==========================================
  Files         137      136       -1     
  Lines       18257    18291      +34     
==========================================
+ Hits        13534    13622      +88     
+ Misses       4723     4669      -54
Impacted Files Coverage Δ
satpy/tests/test_resample.py 98.61% <100%> (+0.11%) ⬆️
satpy/resample.py 81.6% <100%> (+5.09%) ⬆️
satpy/readers/hrit_base.py 79.5% <0%> (-1.92%) ⬇️
satpy/readers/hrit_electrol.py 34.42% <0%> (ø) ⬆️
satpy/readers/hrit_msg.py 44.63% <0%> (ø) ⬆️
satpy/readers/hrit_goes.py 51.65% <0%> (ø) ⬆️
satpy/readers/hrit_jma.py 97.67% <0%> (ø) ⬆️
satpy/readers/nc_nwcsaf_msg.py
satpy/tests/reader_tests/test_hrit_base.py 93.87% <0%> (+0.03%) ⬆️

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 19e3f83...bc6ec5e. Read the comment docs.

@djhoese djhoese merged commit b0d468e into pytroll:master Nov 23, 2018
@mraspaud mraspaud deleted the fix-dtype-preservation branch November 23, 2018 19:22
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