diff --git a/components/isceobj/StripmapProc/runDenseOffsets.py b/components/isceobj/StripmapProc/runDenseOffsets.py index eb27366..0071b1e 100644 --- a/components/isceobj/StripmapProc/runDenseOffsets.py +++ b/components/isceobj/StripmapProc/runDenseOffsets.py @@ -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 diff --git a/components/isceobj/StripmapProc/runRubbersheet.py b/components/isceobj/StripmapProc/runRubbersheet.py index ea417bd..6f6afc8 100644 --- a/components/isceobj/StripmapProc/runRubbersheet.py +++ b/components/isceobj/StripmapProc/runRubbersheet.py @@ -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 - -