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

Hardcoding of mersi2 l1b reader valid_range for channel 24 and 25 as these are wrong in the HDF data #874

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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