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

Unmasked data when using DayNightCompositor #377

Closed
pnuu opened this issue Jul 31, 2018 · 0 comments · Fixed by #378
Closed

Unmasked data when using DayNightCompositor #377

pnuu opened this issue Jul 31, 2018 · 0 comments · Fixed by #378

Comments

@pnuu
Copy link
Member

pnuu commented Jul 31, 2018

When using DayNightCompositor and produce an image in a global EPSG:4326 grid there's a unmasked (black) area around the valida data area. If the sub-images used within the DayNightCompositor are loaded, resampled and saved, they have the areas masked correctly.

To Reproduce

areas.def:

REGION: EPSG4326 {
   NAME:    Global equal latitude/longitude grid for global sphere
   PCS_ID:  EPSG:4326
   PCS_DEF: init=EPSG:4326
   XSIZE: 8192
   YSIZE: 4096
   AREA_EXTENT:  (-180.0, -90.0, 180.0, 90.0)
};

$PPP_CONFIG_DIR/composites/seviri.yaml:

  natural_with_night_fog:
    compositor: !!python/name:satpy.composites.DayNightCompositor
    standard_name: natural_with_night_fog
    prerequisites:
      - natural
      - night_fog
import glob
from satpy import Scene

fnames = glob.glob('/data/*201805220700*')
glbl = Scene(reader='hrit_msg', filenames=fnames)
glbl.load(['natural_with_night_fog'])
lcl = glbl.resample('EPSG4326', resampler='nearest')
lcl.save_dataset('natural_with_night_fog', '/tmp/natural_with_night_fog.png')

Expected behavior
Image with properly masked out-of-area, like in the image below (composite from 0.6 channel, doesn't matter which one used).
vis06

Actual results
Unmasked area around the valid data shouldn't be there.
natural_with_night_fog_scaled

Environment Info:

  • OS: Linux, RHEL6, Conda, Python 3.6
  • SatPy Version: 0.9.1a0.dev0
  • PyResample Version: 1.10.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant