Skip to content

Commit

Permalink
buxfix
Browse files Browse the repository at this point in the history
  • Loading branch information
konstntokas committed Dec 4, 2024
1 parent bff9d5c commit 2bb83ed
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
5 changes: 1 addition & 4 deletions xcube_stac/stac_extension/raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def apply_offset_scaling_odc_stac(ds: xr.Dataset, grouped_items: dict) -> xr.Dat
if (
asset_name == "crs"
or asset_name == "spatial_ref"
or str(asset_name).lower() != "scl"
or str(asset_name).lower() == "scl"
):
continue
scale = np.zeros(len(grouped_items))
Expand All @@ -65,9 +65,6 @@ def apply_offset_scaling_odc_stac(ds: xr.Dataset, grouped_items: dict) -> xr.Dat
nodata_val[i] = raster_bands[0].get("nodata")
scale[i] = raster_bands[0].get("scale", 1)
offset[i] = raster_bands[0].get("offset", 0)
import pdb

pdb.set_trace()
assert np.unique(nodata_val).size == 1
ds[asset_name] = ds[asset_name].where(ds[asset_name] != nodata_val[0])
ds[asset_name] *= scale[:, np.newaxis, np.newaxis]
Expand Down
4 changes: 0 additions & 4 deletions xcube_stac/store_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,9 +509,6 @@ def open_data(
time_ranges = [open_params["time_range"]]
items = []
for time_range in time_ranges[:1]:
import pdb

pdb.set_trace()
items = items + list(
self._helper.search_items(
self._catalog,
Expand Down Expand Up @@ -567,7 +564,6 @@ def open_data(
items_odc_stac,
**odc_stac_params,
)
pdb.set_trace()
if open_params.get("apply_scaling", False):
ds = apply_offset_scaling_odc_stac(ds, grouped_items)

Expand Down

0 comments on commit 2bb83ed

Please sign in to comment.