diff --git a/darts-preprocessing/src/darts_preprocessing/data_sources/s2.py b/darts-preprocessing/src/darts_preprocessing/data_sources/s2.py index 24adf69..6711c3b 100644 --- a/darts-preprocessing/src/darts_preprocessing/data_sources/s2.py +++ b/darts-preprocessing/src/darts_preprocessing/data_sources/s2.py @@ -34,9 +34,9 @@ def load_s2_scene(fpath: str | Path) -> xr.Dataset: # Get imagepath try: - s2_image = next(fpath.glob("*_SR_*.tif")) + s2_image = next(fpath.glob("*_SR*.tif")) except StopIteration: - raise FileNotFoundError(f"No matching TIFF files found in {fpath.resolve()} (.glob('*_SR_clip.tif'))") + raise FileNotFoundError(f"No matching TIFF files found in {fpath.resolve()} (.glob('*_SR*.tif'))") # Define band names and corresponding indices s2_da = xr.open_dataarray(s2_image) diff --git a/darts-preprocessing/src/darts_preprocessing/preprocess.py b/darts-preprocessing/src/darts_preprocessing/preprocess.py index 2976c0e..83243f8 100644 --- a/darts-preprocessing/src/darts_preprocessing/preprocess.py +++ b/darts-preprocessing/src/darts_preprocessing/preprocess.py @@ -143,8 +143,8 @@ def load_and_preprocess_sentinel2_scene( │ └── 4372514_slope.tif └── sentinel2 └── 20220826T200911_20220826T200905_T17XMJ/ - ├── 20220826T200911_20220826T200905_T17XMJ_SCL_clip.tif - └── 20220826T200911_20220826T200905_T17XMJ_SR_clip.tif + ├── 20220826T200911_20220826T200905_T17XMJ_SCL(_clip).tif + └── 20220826T200911_20220826T200905_T17XMJ_SR(_clip).tif ``` Load and preprocess a Sentinel Scene: