Skip to content

Commit

Permalink
remove prints
Browse files Browse the repository at this point in the history
  • Loading branch information
konstntokas committed Dec 4, 2024
1 parent 6740115 commit e8b86b2
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions xcube_stac/stac_extension/raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,7 @@ def apply_offset_scaling_odc_stac(ds: xr.Dataset, grouped_items: dict) -> xr.Dat
scale[i] = raster_bands[0].get("scale", 1)
offset[i] = raster_bands[0].get("offset", 0)
assert np.unique(nodata_val).size == 1
import datetime

print(f"{datetime.datetime.now()}: start nan values")
ds[asset_name] = ds[asset_name].where(ds[asset_name] != nodata_val[0])
print(f"{datetime.datetime.now()}: start scale")
ds[asset_name] *= scale[:, np.newaxis, np.newaxis]
print(f"{datetime.datetime.now()}: start offset")
ds[asset_name] += offset[:, np.newaxis, np.newaxis]
print(f"{datetime.datetime.now()}: scaling done")
return ds

0 comments on commit e8b86b2

Please sign in to comment.