def run(frame1, objFormSLC1, objMocompbaseline, intImage, velocity, height, infos, stdWriter, catalog=None, sceneid='NO_ID'): logger.info("Running correct: %s" % sceneid) #intImage = isceobj.createIntImage() ##just pass the image object to Correct and it will handle the creation ## and deletion of the actual image pointer #IU.copyAttributes(topoIntImage, intImage) posIndx = 1 mocompPosition1 = objFormSLC1.mocompPosition centroid = infos['dopplerCentroid'].getDopplerCoefficients(inHz=False)[0] planet = frame1.instrument.platform.planet prf1 = frame1.instrument.PRF objCorrect = stdproc.createCorrect() objCorrect.wireInputPort(name='peg', object=infos['peg']) objCorrect.wireInputPort(name='frame', object=frame1) objCorrect.wireInputPort(name='planet', object=planet) objCorrect.wireInputPort(name='interferogram', object=intImage) objCorrect.wireInputPort(name='masterslc', object=objFormSLC1) #Piyush #objCorrect.setDopplerCentroidConstantTerm(centroid) #ML 2014-08-05 # Average velocity and height measurements objCorrect.setBodyFixedVelocity(velocity) objCorrect.setSpacecraftHeight(height) # Need the reference orbit from Formslc objCorrect.setReferenceOrbit(mocompPosition1[posIndx]) objCorrect.setMocompBaseline(objMocompbaseline.baseline) sch12 = objMocompbaseline.getSchs() objCorrect.setSch1(sch12[0]) objCorrect.setSch2(sch12[1]) sc = objMocompbaseline.sc objCorrect.setSc(sc) midpoint = objMocompbaseline.midpoint objCorrect.setMidpoint(midpoint) objCorrect.setLookSide(infos['lookSide']) objCorrect.setNumberRangeLooks(infos['numberRangeLooks']) objCorrect.setNumberAzimuthLooks(infos['numberAzimuthLooks']) objCorrect.setTopophaseMphFilename(infos['outputPath'] + '.' + infos['topophaseMphFilename']) objCorrect.setTopophaseFlatFilename(infos['outputPath'] + '.' + infos['topophaseFlatFilename']) objCorrect.setHeightSchFilename(infos['refOutputPath'] + '.' + infos['heightSchFilename']) objCorrect.setISMocomp(infos['is_mocomp']) #set the tag used in the outfile. each message is precided by this tag #is the writer is not of "file" type the call has no effect objCorrect.stdWriter = stdWriter.set_file_tags("correct", "log", "err", "out") objCorrect() #.correct() if catalog is not None: # Record the inputs and outputs isceobj.Catalog.recordInputsAndOutputs(catalog, objCorrect, "runCorrect.%s" % sceneid, logger, "runCorrect.%s" % sceneid) return objCorrect
def runCorrect(self): logger.info("Running correct") objMocompbaseline = self.insar.mocompBaseline objFormSlc1 = self.insar.formSLC1 topoIntImage = self.insar.topoIntImage intImage = isceobj.createIntImage() #just pass the image object to Correct and it will handle the creation # and deletion of the actual image pointer IU.copyAttributes(topoIntImage, intImage) posIndx = 1 mocompPosition1 = objFormSlc1.mocompPosition planet = self.insar.masterFrame.instrument.platform.planet prf1 = self.insar.masterFrame.instrument.PRF objCorrect = stdproc.createCorrect() objCorrect.wireInputPort(name='peg', object=self.insar.peg) objCorrect.wireInputPort(name='frame', object=self.insar.masterFrame) objCorrect.wireInputPort(name='planet', object=planet) objCorrect.wireInputPort(name='interferogram', object=intImage) objCorrect.wireInputPort(name='masterslc', object=self.insar.formSLC1) #Piyush # Average velocity and height measurements v = self.insar.procVelocity h = self.insar.averageHeight objCorrect.setBodyFixedVelocity(v) objCorrect.setSpacecraftHeight(h) # Need the reference orbit from Formslc objCorrect.setReferenceOrbit(mocompPosition1[posIndx]) objCorrect.setMocompBaseline(objMocompbaseline.baseline) sch12 = objMocompbaseline.getSchs() objCorrect.setSch1(sch12[0]) objCorrect.setSch2(sch12[1]) sc = objMocompbaseline.sc objCorrect.setSc(sc) midpoint = objMocompbaseline.midpoint objCorrect.setMidpoint(midpoint) objCorrect.setLookSide(self.insar._lookSide) objCorrect.setNumberRangeLooks(self.insar.numberRangeLooks) objCorrect.setNumberAzimuthLooks(self.insar.numberAzimuthLooks) objCorrect.setTopophaseMphFilename(self.insar.topophaseMphFilename) objCorrect.setTopophaseFlatFilename(self.insar.topophaseFlatFilename) objCorrect.setHeightSchFilename(self.insar.heightSchFilename) objCorrect.setISMocomp(self.insar.is_mocomp) #set the tag used in the outfile. each message is precided by this tag #is the writer is not of "file" type the call has no effect objCorrect.stdWriter = self._writer_set_file_tags("correct", "log", "err", "out") objCorrect()#.correct() # Record the inputs and outputs from isceobj.Catalog import recordInputsAndOutputs recordInputsAndOutputs(self.insar.procDoc, objCorrect, "runCorrect", logger, "runCorrect") return objCorrect