Change doRubbersheeting to doRubbersheetingAzimuth.

LT1AB
HBaldwin3 2019-12-18 14:44:34 -06:00
parent 48fda5a647
commit 7df2b44a0c
2 changed files with 12 additions and 14 deletions

View File

@ -62,7 +62,7 @@ def estimateOffsetField(master, slave, denseOffsetFileName,
else:
objOffset.setImageDataType2('real')
objOffset.offsetImageName = denseOffsetFileName + '.bil'
objOffset.snrImageName = denseOffsetFileName +'_snr.bil'
objOffset.covImageName = denseOffsetFileName +'_cov.bil'
@ -75,11 +75,11 @@ def estimateOffsetField(master, slave, denseOffsetFileName,
def runDenseOffsets(self):
if self.doDenseOffsets or self.doRubbersheeting:
if self.doDenseOffsets or self.doRubbersheetingAzimuth:
if self.doDenseOffsets:
print('Dense offsets explicitly requested')
if self.doRubbersheeting:
if self.doRubbersheetingAzimuth:
print('Generating offsets as rubber sheeting requested')
else:
return
@ -96,7 +96,7 @@ def runDenseOffsets(self):
os.makedirs(dirname)
denseOffsetFilename = os.path.join(dirname , self.insar.denseOffsetFilename)
field = estimateOffsetField(masterSlc, slaveSlc, denseOffsetFilename,
ww = self.denseWindowWidth,
wh = self.denseWindowHeight,
@ -107,5 +107,5 @@ def runDenseOffsets(self):
self._insar.offset_top = field[0]
self._insar.offset_left = field[1]
return None

View File

@ -13,13 +13,13 @@ def fill(data, invalid=None):
"""
Replace the value of invalid 'data' cells (indicated by 'invalid')
by the value of the nearest valid data cell
Input:
data: numpy array of any dimension
invalid: a binary array of same shape as 'data'.
data value are replaced where invalid is True
If None (default), use: invalid = np.isnan(data)
Output:
Return a filled array.
"""
@ -97,7 +97,7 @@ def resampleOffset(maskedFiltOffset, geometryOffset, outName):
###Currently making the assumption that top left of dense offsets and interfeorgrams are the same.
###This is not true for now. We need to update DenseOffsets to have the ability to have same top left
###As the input images. Once that is implemente, the math here should all be consistent.
###However, this is not too far off since the skip for doing dense offsets is generally large.
###However, this is not too far off since the skip for doing dense offsets is generally large.
###The offset is not too large to worry about right now. If the skip is decreased, this could be an issue.
print('oversampling the filtered and masked offsets to the width and length:', width, ' ', length )
@ -125,7 +125,7 @@ def resampleOffset(maskedFiltOffset, geometryOffset, outName):
for ll in range(length):
val = geomoff.bands[0][ll,:] + osoff.bands[0][ll,:]
val.tofile(fid)
fid.close()
img = isceobj.createImage()
@ -138,13 +138,13 @@ def resampleOffset(maskedFiltOffset, geometryOffset, outName):
img.scheme = 'BIP'
img.renderHdr()
return None
def runRubbersheet(self):
if not self.doRubbersheeting:
if not self.doRubbersheetingAzimuth:
print('Rubber sheeting not requested ... skipping')
return
@ -168,11 +168,9 @@ def runRubbersheet(self):
sheetOffset = os.path.join(offsetsDir, self.insar.azimuthRubbersheetFilename)
# oversampling the filtAzOffsetFile to the same size of geometryAzimuthOffset
# and then update the geometryAzimuthOffset by adding the oversampled
# and then update the geometryAzimuthOffset by adding the oversampled
# filtAzOffsetFile to it.
resampleOffset(filtAzOffsetFile, geometryAzimuthOffset, sheetOffset)
print("I'm here")
return None