Change doRubbersheeting to doRubbersheetingAzimuth.
parent
48fda5a647
commit
7df2b44a0c
|
@ -62,7 +62,7 @@ def estimateOffsetField(master, slave, denseOffsetFileName,
|
||||||
else:
|
else:
|
||||||
objOffset.setImageDataType2('real')
|
objOffset.setImageDataType2('real')
|
||||||
|
|
||||||
|
|
||||||
objOffset.offsetImageName = denseOffsetFileName + '.bil'
|
objOffset.offsetImageName = denseOffsetFileName + '.bil'
|
||||||
objOffset.snrImageName = denseOffsetFileName +'_snr.bil'
|
objOffset.snrImageName = denseOffsetFileName +'_snr.bil'
|
||||||
objOffset.covImageName = denseOffsetFileName +'_cov.bil'
|
objOffset.covImageName = denseOffsetFileName +'_cov.bil'
|
||||||
|
@ -75,11 +75,11 @@ def estimateOffsetField(master, slave, denseOffsetFileName,
|
||||||
|
|
||||||
def runDenseOffsets(self):
|
def runDenseOffsets(self):
|
||||||
|
|
||||||
if self.doDenseOffsets or self.doRubbersheeting:
|
if self.doDenseOffsets or self.doRubbersheetingAzimuth:
|
||||||
if self.doDenseOffsets:
|
if self.doDenseOffsets:
|
||||||
print('Dense offsets explicitly requested')
|
print('Dense offsets explicitly requested')
|
||||||
|
|
||||||
if self.doRubbersheeting:
|
if self.doRubbersheetingAzimuth:
|
||||||
print('Generating offsets as rubber sheeting requested')
|
print('Generating offsets as rubber sheeting requested')
|
||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
|
@ -96,7 +96,7 @@ def runDenseOffsets(self):
|
||||||
os.makedirs(dirname)
|
os.makedirs(dirname)
|
||||||
|
|
||||||
denseOffsetFilename = os.path.join(dirname , self.insar.denseOffsetFilename)
|
denseOffsetFilename = os.path.join(dirname , self.insar.denseOffsetFilename)
|
||||||
|
|
||||||
field = estimateOffsetField(masterSlc, slaveSlc, denseOffsetFilename,
|
field = estimateOffsetField(masterSlc, slaveSlc, denseOffsetFilename,
|
||||||
ww = self.denseWindowWidth,
|
ww = self.denseWindowWidth,
|
||||||
wh = self.denseWindowHeight,
|
wh = self.denseWindowHeight,
|
||||||
|
@ -107,5 +107,5 @@ def runDenseOffsets(self):
|
||||||
|
|
||||||
self._insar.offset_top = field[0]
|
self._insar.offset_top = field[0]
|
||||||
self._insar.offset_left = field[1]
|
self._insar.offset_left = field[1]
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
|
@ -13,13 +13,13 @@ def fill(data, invalid=None):
|
||||||
"""
|
"""
|
||||||
Replace the value of invalid 'data' cells (indicated by 'invalid')
|
Replace the value of invalid 'data' cells (indicated by 'invalid')
|
||||||
by the value of the nearest valid data cell
|
by the value of the nearest valid data cell
|
||||||
|
|
||||||
Input:
|
Input:
|
||||||
data: numpy array of any dimension
|
data: numpy array of any dimension
|
||||||
invalid: a binary array of same shape as 'data'.
|
invalid: a binary array of same shape as 'data'.
|
||||||
data value are replaced where invalid is True
|
data value are replaced where invalid is True
|
||||||
If None (default), use: invalid = np.isnan(data)
|
If None (default), use: invalid = np.isnan(data)
|
||||||
|
|
||||||
Output:
|
Output:
|
||||||
Return a filled array.
|
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.
|
###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
|
###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.
|
###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.
|
###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 )
|
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):
|
for ll in range(length):
|
||||||
val = geomoff.bands[0][ll,:] + osoff.bands[0][ll,:]
|
val = geomoff.bands[0][ll,:] + osoff.bands[0][ll,:]
|
||||||
val.tofile(fid)
|
val.tofile(fid)
|
||||||
|
|
||||||
fid.close()
|
fid.close()
|
||||||
|
|
||||||
img = isceobj.createImage()
|
img = isceobj.createImage()
|
||||||
|
@ -138,13 +138,13 @@ def resampleOffset(maskedFiltOffset, geometryOffset, outName):
|
||||||
img.scheme = 'BIP'
|
img.scheme = 'BIP'
|
||||||
img.renderHdr()
|
img.renderHdr()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def runRubbersheet(self):
|
def runRubbersheet(self):
|
||||||
|
|
||||||
if not self.doRubbersheeting:
|
if not self.doRubbersheetingAzimuth:
|
||||||
print('Rubber sheeting not requested ... skipping')
|
print('Rubber sheeting not requested ... skipping')
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -168,11 +168,9 @@ def runRubbersheet(self):
|
||||||
sheetOffset = os.path.join(offsetsDir, self.insar.azimuthRubbersheetFilename)
|
sheetOffset = os.path.join(offsetsDir, self.insar.azimuthRubbersheetFilename)
|
||||||
|
|
||||||
# oversampling the filtAzOffsetFile to the same size of geometryAzimuthOffset
|
# 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.
|
# filtAzOffsetFile to it.
|
||||||
resampleOffset(filtAzOffsetFile, geometryAzimuthOffset, sheetOffset)
|
resampleOffset(filtAzOffsetFile, geometryAzimuthOffset, sheetOffset)
|
||||||
|
|
||||||
print("I'm here")
|
print("I'm here")
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue