Skip to content
Snippets Groups Projects
Commit 9119db1d authored by pascal.mouquet_ird.fr's avatar pascal.mouquet_ird.fr
Browse files

some change to Tiles

parent aae3e28a
No related branches found
No related tags found
No related merge requests found
Pipeline #41 failed
......@@ -797,7 +797,9 @@ class Tile:
return {"identified_problems": nb_id, "removed_problems": nb_rm}
def archive_l1c(self,
size_only: bool = False,):
size_only: bool = False,
force: bool = False,
):
"""
Check and move l1c products to l1c archive folder
......@@ -805,17 +807,19 @@ class Tile:
l1c_archive_path = Path(Config().get("l1c_archive_path"))
prod_list = ProductsList()
archive_l1c_set = {a for a in {identifier.replace("L2A_", "L1C_").replace("_USER_", "__OPER__")
for identifier in self.l2a.products} if a in set(self.l1c.products)}
for prod in archive_l1c_set:
prod_list[prod] = {"date": self._products["l1c"][prod].date,
"cloud_cover": self._products["l1c"][prod].cloud_cover}
if force:
prod_list = self.l1c
else:
prod_list = ProductsList()
archive_l1c_set = {a for a in {identifier.replace("L2A_", "L1C_").replace("_USER_", "__OPER__")
for identifier in self.l2a.products} if a in set(self.l1c.products)}
for prod in archive_l1c_set:
prod_list[prod] = {"date": self._products["l1c"][prod].date,
"cloud_cover": self._products["l1c"][prod].cloud_cover}
count = 0
total_size = 0
if prod_list:
count = 0
total_size = 0
for prod in prod_list:
l1c = L1cProduct(prod.identifier)
if not l1c.path.is_symlink():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment