Skip to content

Commit

Permalink
Fix bug in viirs composites when combining infos
Browse files Browse the repository at this point in the history
  • Loading branch information
djhoese committed Mar 18, 2016
1 parent 21a6844 commit 56b62ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions satpy/composites/viirs.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def __call__(self, projectables, nonprojectables=None, **info):
info.update(self.info)
# Force certain pieces of metadata that we *know* to be true
info["wavelength_range"] = None
info.setdefault("mode", "RGB")
info["mode"] = self.info.get("mode", "RGB")
return Projectable(
data=np.rollaxis(np.ma.dstack([projectable for projectable in projectables]), axis=2),
**info)
Expand Down Expand Up @@ -112,13 +112,13 @@ def __call__(self, datasets, optional_datasets=[], **info):
mask = p1.mask | p2.mask | p3.mask

# Collect information that is the same between the projectables
info = combine_info(r, g, b)
info = combine_info(*datasets)
# Update that information with configured information (including name)
info.update(self.info)
# Force certain pieces of metadata that we *know* to be true
info["wavelength_range"] = None
info.setdefault("standard_name", "true_color")
info.setdefault("mode", "RGB")
info["mode"] = self.info.get("mode", "RGB")
return Projectable(
data=np.concatenate(
([r], [g], [b]), axis=0),
Expand Down

0 comments on commit 56b62ac

Please sign in to comment.