From 97613f29a5c7d56ffe6c408e340f51fecdde9184 Mon Sep 17 00:00:00 2001 From: Ashlin Richardson Date: Sun, 10 Nov 2024 21:48:11 -0800 Subject: [PATCH] update --- rcm/alos2_dualpol_process.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/rcm/alos2_dualpol_process.py b/rcm/alos2_dualpol_process.py index aa5467ca..89a433cf 100755 --- a/rcm/alos2_dualpol_process.py +++ b/rcm/alos2_dualpol_process.py @@ -56,6 +56,20 @@ def run(x): '-t ' + p_1]) print(p_1) + # check number of channels to determine if dual-pol or quad-pol dataset + n_channels = os.popen('grep "Number of SAR channels" ' + p_1).read().strip().split('\n')[0] + # print(n_channels) + n_channels = int(n_channels.split('>')[1].split('<')[0]) + # print(n_channels) + if(n_channels == 4): + print("DUAL-POL MODE") + elif(n_channels == 8): + print("QUAD-POL MODE") + QUAD_POL = True + else: + print("UNEXPECTED NUMBER OF CHANNELS") + sys.exit(1) + ''' /opt/snap/bin/gpt Calibration -h Usage: @@ -123,20 +137,6 @@ def run(x): '-PoutputImageInComplex=true']) print(p_2) - # check number of channels to determine if dual-pol or quad-pol dataset - n_channels = os.popen('grep "Number of SAR channels" ' + p_2).read().strip().split('\n')[0] - # print(n_channels) - n_channels = int(n_channels.split('>')[1].split('<')[0]) - # print(n_channels) - if(n_channels == 4): - print("DUAL-POL MODE") - elif(n_channels == 8): - print("QUAD-POL MODE") - QUAD_POL = True - else: - print("UNEXPECTED NUMBER OF CHANNELS") - sys.exit(1) - if not exist(p_3): run([snap, 'Polarimetric-Matrices', '-Ssource=' + p_2,