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

Update scale factor and offset [viirs_l1b] #3016

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
5 changes: 5 additions & 0 deletions satpy/readers/viirs_l1b.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,11 @@ def get_dataset(self, dataset_id, ds_info):
if factors[0] != 1 or factors[1] != 0:
data *= factors[0]
data += factors[1]

# update scale_factor and scale_offset
data.attrs["scale_factor"] = scale_factor
data.attrs["add_offset"] = scale_offset
djhoese marked this conversation as resolved.
Show resolved Hide resolved

# rename dimensions to correspond to satpy's 'y' and 'x' standard
if "number_of_lines" in data.dims:
data = data.rename({"number_of_lines": "y", "number_of_pixels": "x"})
Expand Down
Loading