Fix Burst Loading in Estimate Range and Azimuth Misreg (#110)

* Fix burst loading in estimateAzimuthMisreg.py

Within the for loop that starts at line 82, looping through range(minBurst, maxBurst) misses the burst with the maximum burst number. In cases where only one burst in a swath is used, the script fails at line 90 when .getWidth() is called on an empty xml. This issue can be fixed by adding the line maxBurst = maxBurst + 1

* Fix burst loading in estimateRangeMisreg.py

Similar to estimateAzimuthMisreg.py, calling range(minBurst,maxBurst) at line 185 will lead to an empty list and the some bursts not being loaded unless line 181 is changed from maxBurst = maxBurst - 1 to maxBurst = maxBurst +1
LT1AB
Forrest Williams 2020-04-10 15:57:44 +12:00 committed by GitHub
parent c92759a7db
commit 16b7e10d32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -63,6 +63,7 @@ def main(iargs=None):
minBurst = int(os.path.basename(freqFiles[0]).split('.')[0][-2:])
maxBurst = int(os.path.basename(freqFiles[-1]).split('.')[0][-2:])
maxBurst = maxBurst + 1
#maxBurst = maxBurst - 1
@ -79,9 +80,9 @@ def main(iargs=None):
# val = []
lineCount = 0
for ii in range(minBurst, maxBurst):
intname = os.path.join(esddir, 'overlap_%02d.%dalks_%drlks.int'%(ii+1, alks,rlks))
freqname = os.path.join(esddir, 'freq_%02d.%dalks_%drlks.bin'%(ii+1,alks,rlks))
corname = os.path.join(esddir, 'overlap_%02d.%dalks_%drlks.cor'%(ii+1, alks, rlks))
intname = os.path.join(esddir, 'overlap_%02d.%dalks_%drlks.int'%(ii, alks,rlks))
freqname = os.path.join(esddir, 'freq_%02d.%dalks_%drlks.bin'%(ii,alks,rlks))
corname = os.path.join(esddir, 'overlap_%02d.%dalks_%drlks.cor'%(ii, alks, rlks))
img = isceobj.createImage()

View File

@ -178,7 +178,8 @@ def main(iargs=None):
minBurst = max(minSlave, minMaster)
maxBurst = min(maxSlave, maxMaster)
maxBurst = maxBurst - 1 ###For overlaps
#maxBurst = maxBurst - 1 ###For overlaps
maxBurst = maxBurst + 1
for pair in [(masterTop,slaveTop), (masterBottom,slaveBottom)]:
for ii in range(minBurst,maxBurst):