Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ashlinrichardson committed Nov 11, 2024
1 parent f928047 commit 97613f2
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions rcm/alos2_dualpol_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 97613f2

Please sign in to comment.