Skip to content

Commit

Permalink
Merge pull request #874 from TAlonglong/feature-correct-mersi2-invali…
Browse files Browse the repository at this point in the history
…d-valid-range

Hardcoding of mersi2 l1b reader valid_range for channel 24 and 25 as these are wrong in the HDF data
  • Loading branch information
mraspaud committed Aug 22, 2019
2 parents 5b68785 + e05d9f3 commit d90e7f5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions satpy/readers/mersi2_l1b.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ def get_dataset(self, dataset_id, ds_info):
else:
new_fill = np.nan
if valid_range is not None:
# Due to a bug in the valid_range upper limit in the 10.8(24) and 12.0(25)
# in the HDF data, this is hardcoded here.
if dataset_id.name in ['24', '25'] and valid_range[1] == 4095:
valid_range[1] = 25000
# typically bad_values == 65535, saturated == 65534
# dead detector == 65533
data = data.where((data >= valid_range[0]) &
Expand Down

0 comments on commit d90e7f5

Please sign in to comment.