Skip to content

Commit 497bf4b

Browse files
committed
FIX: Fix SNAP fallback issue
1 parent f8a3531 commit 497bf4b

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- FIX: Fix border effect (extent replacing footprint) when computing the extent before the footprint for `Umbra` products
77
- FIX: Ensure outputing quicklook paths as strings
88
- FIX: Get correct buffer for windows in geographic CRS when subsetting SAR data
9+
- FIX: Fix SNAP fallback issue
910
- DOC: Update copyright to 2026
1011

1112
## 0.23.0 (2026-01-02)

eoreader/products/sar/sar_product.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,19 +1114,20 @@ def _pre_process_snap(
11141114
misc.run_cli(cmd_list)
11151115

11161116
# Check the BEAM-DIMAP output exists (if not, trigger CSK fallback)
1117-
assert (
1118-
AnyPath(pp_dim).suffix == ".data" and AnyPath(pp_dim).is_dir()
1117+
assert AnyPath(pp_dim).suffix == ".dim", (
1118+
f"Assert {pp_dim} is written in BEAM-DIMAP"
11191119
)
1120+
assert AnyPath(pp_dim).is_dir(), f"Assert {pp_dim} is a directory"
11201121

11211122
# With SNAP 13.0.0, there is an issue with CSK and calibration:
11221123
# - no output is written for DGM
11231124
# - GPT graph fails for SCS
11241125
# Add this fallback for the moment
1125-
except AssertionError:
1126-
self._fallback_csk_snap_13(write_lia, tmp_dir, snap_args)
1126+
except AssertionError as ex:
1127+
self._fallback_csk_snap_13(write_lia, tmp_dir, snap_args, ex)
11271128
except RuntimeError as ex:
11281129
if self.constellation == Constellation.CSK:
1129-
self._fallback_csk_snap_13(write_lia, tmp_dir, snap_args)
1130+
self._fallback_csk_snap_13(write_lia, tmp_dir, snap_args, ex)
11301131
else:
11311132
raise RuntimeError("Something went wrong with SNAP!") from ex
11321133

@@ -1146,11 +1147,12 @@ def _pre_process_snap(
11461147
pre_processed_path, pp_dim, band, crop=window_to_crop, **kwargs
11471148
)
11481149

1149-
def _fallback_csk_snap_13(self, write_lia: bool, tmp_dir, snap_args):
1150+
def _fallback_csk_snap_13(self, write_lia: bool, tmp_dir, snap_args, ex):
11501151
"""
11511152
With SNAP 13.0.0, there is an issue with CSK and calibration
11521153
Apply this fallback until it's resolved
11531154
"""
1155+
LOGGER.debug(ex)
11541156
LOGGER.warning(
11551157
"There is an issue with CSK and calibration with SNAP 13.0.0. "
11561158
"This step is removed to make the computation work nevertheless. "

0 commit comments

Comments
 (0)