diff --git a/python_src/utils/func_utils.py b/python_src/utils/func_utils.py index 5c7d36bd8bd8c00badc703fa3a24be61bc305dfb..a82cdd2a8dbdd9fdb2be89dc798d3e8274dc61f5 100644 --- a/python_src/utils/func_utils.py +++ b/python_src/utils/func_utils.py @@ -258,14 +258,24 @@ def check_image_pattern(img, mode="S1SM") : if mode == "S1SM" : - # Mode S1 SM + # Mode S1 SM : mmm-bb-ttt-pp-yyyymmddthhmmss-yyyymmddthhmmss* + # mmm : Mission identifier (s1a or s1b) + # bb : Mode/Beam (s1-s6 for SM) + # ttt : Product type (always slc here) + # pp : Polarisations (2 letters : hh or vv or vh or hv) + # yyyymmddthhmmss : Product start/stop date and times + # (14 digits representing the date and time separated by the character "t") + # * : Others representations such as orbits number or images number ... pattern = "".join(["s1.", "-", '\w{1}', '\d', "-slc-", '\w{2}', "-", '\d{8}', "t", '\d{6}', "-", '\d{8}', "t", '\d{6}']) if re.match(pattern, img) : correct_pattern = True elif mode == "Cosmo": - # Mode Cosmo + # Mode Cosmo : CSKS<i>_*_<YYYYMMDDhhmmss>_<YYYYMMDDhhmmss> + # i : Identifier of the satellite (1, 2, 3 or 4) + # YYYYMMDDhhmmss : Product start/stop date and times + # * : Others representations such as identifier for orbit direction or look side pattern = "".join(["CSKS", '\d']) if re.match(pattern, img) : @@ -276,7 +286,14 @@ def check_image_pattern(img, mode="S1SM") : correct_pattern = True else : - # Mode S1 IW + # Mode S1 IW : mmm-bb-ttt-pp-yyyymmddthhmmss-yyyymmddthhmmss* + # mmm : Mission identifier (s1A or s1B) + # bb : Mode/Beam (iw1-iw3 for IW) + # ttt : Product type (always slc here) + # pp : Polarisations (2 letters : hh or vv or vh or hv) + # yyyymmddthhmmss : Product start/stop date and times + # (14 digits representing the date and time separated by the character "t") + # * : Others representations such as orbits number or images number ... pattern = "".join(["s1.", "-", '\w{2}', '\d', "-slc-", '\w{2}', "-", '\d{8}', "t", '\d{6}', "-", '\d{8}', "t", '\d{6}']) if re.match(pattern, img) :