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

Improve the SAR-C reading and Ice composite #557

Merged
merged 21 commits into from Mar 8, 2019

Conversation

mraspaud
Copy link
Member

@mraspaud mraspaud commented Dec 20, 2018

This PR makes the sar-ice composite more stable and switches reading rasterio.
Using rasterio facilitates the access to the GCPs and these are added to the lons and lats to allow saving them later on.

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

@mraspaud
Copy link
Member Author

mraspaud commented Dec 20, 2018

New version of the composite

saricenew

Compared to the old version

sariceold

@mraspaud
Copy link
Member Author

Other example, Greenland:

image 1

sarice_eysteinn

@mraspaud
Copy link
Member Author

sarice_katja

@mraspaud
Copy link
Member Author

The sar-land product:

sar-land2

sar-land1

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 77.083% when pulling 5e91f6e on mraspaud:feature-sar-gcps into 3f43d5e on pytroll:master.

@coveralls
Copy link

coveralls commented Dec 20, 2018

Coverage Status

Coverage decreased (-0.3%) to 78.015% when pulling c9b78c5 on mraspaud:feature-sar-gcps into ef5dc2c on pytroll:master.

@codecov
Copy link

codecov bot commented Dec 21, 2018

Codecov Report

Merging #557 into master will decrease coverage by 0.25%.
The diff coverage is 23.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #557      +/-   ##
==========================================
- Coverage   78.29%   78.03%   -0.26%     
==========================================
  Files         136      137       +1     
  Lines       19725    19850     +125     
==========================================
+ Hits        15443    15490      +47     
- Misses       4282     4360      +78
Impacted Files Coverage Δ
satpy/__init__.py 94.73% <ø> (ø) ⬆️
satpy/readers/goes_imager_nc.py 65.73% <ø> (ø) ⬆️
satpy/composites/sar.py 0% <0%> (ø) ⬆️
satpy/tests/reader_tests/__init__.py 97.5% <100%> (+0.06%) ⬆️
satpy/readers/sar_c_safe.py 19.45% <11.4%> (-1.2%) ⬇️
satpy/tests/reader_tests/test_sar_c_safe.py 85.71% <85.71%> (ø)
satpy/composites/viirs.py 83.71% <0%> (-0.04%) ⬇️
satpy/tests/compositor_tests/test_viirs.py 99.28% <0%> (-0.01%) ⬇️
satpy/tests/test_scene.py 99.45% <0%> (ø) ⬆️
... and 2 more

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 ef5dc2c...c9b78c5. Read the comment docs.

"""Blending two layers.

from: https://docs.gimp.org/en/gimp-concepts-layer-modes.html
"""
maxval = xu.maximum(top.max(), bottom.max())
if maxval is None:
maxval = xu.maximum(top.max(), bottom.max())
Copy link
Member

Choose a reason for hiding this comment

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

Can we get rid of the xu usage?

Copy link
Member

Choose a reason for hiding this comment

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

Looks like multiple cases in this module at least.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure

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 except for the xu usage. Feel free to merge after those fixes.

@mraspaud mraspaud changed the title Fix the SAR-C Ice composite and improve reading Improve the SAR-C reading and Ice composite Mar 8, 2019
@mraspaud mraspaud merged commit da8d310 into pytroll:master Mar 8, 2019
@mraspaud mraspaud deleted the feature-sar-gcps branch March 8, 2019 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:compositors component:readers enhancement code enhancements, features, improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants