Skip to content

Commit

Permalink
Merge pull request #192 from pytroll/bugfix-DNC
Browse files Browse the repository at this point in the history
Clip day and night composites after enhancement
  • Loading branch information
djhoese authored Jun 15, 2018
2 parents 951d210 + e5f832b commit 3ce5081
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions satpy/composites/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def _get_reflectance(self, projectables, optional_datasets):
class NIREmissivePartFromReflectance(NIRReflectance):

def __call__(self, projectables, optional_datasets=None, **info):
"""Get the emissive part an NIR channel after having derived the reflectance.
"""Get the emissive part an NIR channel after having derived the reflectance.
Not supposed to be used for wavelength outside [3, 4] µm.
"""
self._init_refl3x(projectables)
Expand Down Expand Up @@ -703,9 +703,9 @@ def __call__(self, projectables, lim_low=85., lim_high=95., *args,

full_data = []

# Apply enhancements
day_data = enhance2dataset(day_data)
night_data = enhance2dataset(night_data)
# Apply enhancements and clip data to interval [0, 1]
day_data = enhance2dataset(day_data).clip(min=0.0, max=1.0)
night_data = enhance2dataset(night_data).clip(min=0.0, max=1.0)

# Match dimensions to the data with more channels
# There are only 1-channel and 3-channel composites
Expand Down

0 comments on commit 3ce5081

Please sign in to comment.