diff --git a/highleveltests/open_SLC_IW.py b/highleveltests/open_SLC_IW.py index 097d496..2f0f930 100644 --- a/highleveltests/open_SLC_IW.py +++ b/highleveltests/open_SLC_IW.py @@ -1,3 +1,4 @@ +import pdb from safe_s1 import Sentinel1Reader, getconfig import time conf = getconfig.get_config() @@ -11,3 +12,4 @@ print('out of the reader') print(dt) print('time to read the SAFE through S3: %1.2f sec'%elapse_t) +pdb.set_trace() diff --git a/safe_s1/reader.py b/safe_s1/reader.py index 3da7c42..0f8e3af 100644 --- a/safe_s1/reader.py +++ b/safe_s1/reader.py @@ -36,6 +36,9 @@ def __init__(self, name, backend_kwargs=None): self.short_name = ':'.join(name_parts) """Like name, but without path""" self.path = ':'.join(self.name.split(':')[1:-1]) + # remove trailing slash in the safe path + if self.path[-1]=='/': + self.path = self.path.rstrip('/') """Dataset path""" self.safe = os.path.basename(self.path) @@ -109,7 +112,7 @@ def __init__(self, name, backend_kwargs=None): assert self.dt==self.datatree else: print('multidataset') - raise Exception() + # raise Exception() def load_digital_number(self, resolution=None, chunks=None, resampling=rasterio.enums.Resampling.rms): """ @@ -519,7 +522,6 @@ def swath_merging(self): describe=True) else : ds = xr.Dataset() - return ds @property