diff --git a/src/ewoc_dag/bucket/ewoc.py b/src/ewoc_dag/bucket/ewoc.py index 5647d76..f59176f 100644 --- a/src/ewoc_dag/bucket/ewoc.py +++ b/src/ewoc_dag/bucket/ewoc.py @@ -215,11 +215,10 @@ def sar_to_satio_csv( """ prds_path = [] prds_datetime = [] - for prd_key in self._list_prds_key( f"{production_id}/SAR/{tileid_to_ard_path_component(tile_id)}" ): - prd_info = EwocS1ArdPrdIdInfo(prd_key.split("/")[8]) + prd_info = EwocS1ArdPrdIdInfo(prd_key.split("/")[-1]) prds_path.append(f"{self._s3_basepath()}{prd_key}") prds_datetime.append(prd_info.acquisition_datetime) @@ -248,11 +247,10 @@ def optical_to_satio_csv( """ prds_path = [] prds_datetime = [] - for prd_key in self._list_prds_key( f"{production_id}/OPTICAL/{tileid_to_ard_path_component(tile_id)}" ): - prd_info = EwocArdPrdIdInfo(prd_key.split("/")[8]) + prd_info = EwocArdPrdIdInfo(prd_key.split("/")[-1]) prds_path.append(f"{self._s3_basepath()}{prd_key}") prds_datetime.append(prd_info.acquisition_datetime) @@ -280,7 +278,7 @@ def tir_to_satio_csv( for prd_key in self._list_prds_key( f"{production_id}/TIR/{tileid_to_ard_path_component(tile_id)}" ): - prd_info = EwocTirArdPrdIdInfo(prd_key.split("/")[8]) + prd_info = EwocTirArdPrdIdInfo(prd_key.split("/")[-1]) prds_path.append(f"{self._s3_basepath()}{prd_key}") prds_datetime.append(prd_info.acquisition_datetime)