From e8b670e643b140372af2567dcb56c52fd1fbb1c8 Mon Sep 17 00:00:00 2001 From: agrouaze Date: Tue, 27 Feb 2024 12:07:02 +0100 Subject: [PATCH] handle properly the case of single pol acquisition -> clear logs --- slcwindinversion/mainslcwindinversion.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/slcwindinversion/mainslcwindinversion.py b/slcwindinversion/mainslcwindinversion.py index 82ba2c1..d3cfdd4 100644 --- a/slcwindinversion/mainslcwindinversion.py +++ b/slcwindinversion/mainslcwindinversion.py @@ -23,6 +23,7 @@ def get_vv_vh(folder, subswath_number): vhs = glob.glob(os.path.join(folder, "*" + os.path.basename(folder)[0:6].lower().replace("_", "-") + str( subswath_number) + "-slc-vh-*.nc")) if (len(vvs) != 1) | (len(vhs) != 1): + logging.info('cannot find the co and cross pol measurement') return [] else: return vvs[0], vhs[0] @@ -38,6 +39,11 @@ def core_inversion(input_folder, outd,version, overwrite=False): """ input_folder = input_folder.rstrip('/') out_folder = outd + if '1SDV' in input_folder or '1SDH' in input_folder: + pass + else: + logging.info('the input SAFE is a single pol acquisition, not handled for now.') + return 0 subswath_numbers = [1, 2, 3] # for IW for subswath_number in subswath_numbers: