Ejemplo n.º 1
0
def runFilt(self):
    '''filter interferogram
    '''
    catalog = isceobj.Catalog.createCatalog(self._insar.procDoc.name)
    self.updateParamemetersFromUser()

    #masterTrack = self._insar.loadTrack(master=True)
    #slaveTrack = self._insar.loadTrack(master=False)

    insarDir = 'insar'
    os.makedirs(insarDir, exist_ok=True)
    os.chdir(insarDir)

    ############################################################
    # STEP 1. filter interferogram
    ############################################################
    print('\nfilter interferogram: {}'.format(
        self._insar.multilookDifferentialInterferogram))

    toBeFiltered = self._insar.multilookDifferentialInterferogram
    if self.removeMagnitudeBeforeFiltering:
        toBeFiltered = 'tmp.int'
        cmd = "imageMath.py -e='a/(abs(a)+(a==0))' --a={} -o {} -t cfloat -s BSQ".format(
            self._insar.multilookDifferentialInterferogram, toBeFiltered)
        runCmd(cmd)

    #if shutil.which('psfilt1') != None:
    if True:
        intImage = isceobj.createIntImage()
        intImage.load(toBeFiltered + '.xml')
        width = intImage.width
        length = intImage.length
        # cmd = "psfilt1 {int} {filtint} {width} {filterstrength} 64 16".format(
        #        int = toBeFiltered,
        #        filtint = self._insar.filteredInterferogram,
        #        width = width,
        #        filterstrength = self.filterStrength
        #        )
        # runCmd(cmd)
        windowSize = self.filterWinsize
        stepSize = self.filterStepsize
        psfilt1(toBeFiltered, self._insar.filteredInterferogram, width,
                self.filterStrength, windowSize, stepSize)
        create_xml(self._insar.filteredInterferogram, width, length, 'int')
    else:
        #original
        intImage = isceobj.createIntImage()
        intImage.load(toBeFiltered + '.xml')
        intImage.setAccessMode('read')
        intImage.createImage()
        width = intImage.width
        length = intImage.length

        #filtered
        filtImage = isceobj.createIntImage()
        filtImage.setFilename(self._insar.filteredInterferogram)
        filtImage.setWidth(width)
        filtImage.setAccessMode('write')
        filtImage.createImage()

        #looks like the ps filtering program keep the original interferogram magnitude, which is bad for phase unwrapping?
        filters = Filter()
        filters.wireInputPort(name='interferogram', object=intImage)
        filters.wireOutputPort(name='filtered interferogram', object=filtImage)
        filters.goldsteinWerner(alpha=self.filterStrength)
        intImage.finalizeImage()
        filtImage.finalizeImage()
        del intImage, filtImage, filters

    if self.removeMagnitudeBeforeFiltering:
        os.remove(toBeFiltered)
        os.remove(toBeFiltered + '.vrt')
        os.remove(toBeFiltered + '.xml')

    #restore original magnitude
    tmpFile = 'tmp.int'
    renameFile(self._insar.filteredInterferogram, tmpFile)
    cmd = "imageMath.py -e='a*abs(b)' --a={} --b={} -o {} -t cfloat -s BSQ".format(
        tmpFile, self._insar.multilookDifferentialInterferogram,
        self._insar.filteredInterferogram)
    runCmd(cmd)
    os.remove(tmpFile)
    os.remove(tmpFile + '.vrt')
    os.remove(tmpFile + '.xml')

    ############################################################
    # STEP 2. create phase sigma using filtered interferogram
    ############################################################
    print('\ncreate phase sigma using: {}'.format(
        self._insar.filteredInterferogram))

    #recreate filtered image
    filtImage = isceobj.createIntImage()
    filtImage.load(self._insar.filteredInterferogram + '.xml')
    filtImage.setAccessMode('read')
    filtImage.createImage()

    #amplitude image
    ampImage = isceobj.createAmpImage()
    ampImage.load(self._insar.multilookAmplitude + '.xml')
    ampImage.setAccessMode('read')
    ampImage.createImage()

    #phase sigma correlation image
    phsigImage = isceobj.createImage()
    phsigImage.setFilename(self._insar.multilookPhsig)
    phsigImage.setWidth(width)
    phsigImage.dataType = 'FLOAT'
    phsigImage.bands = 1
    phsigImage.setImageType('cor')
    phsigImage.setAccessMode('write')
    phsigImage.createImage()

    icu = Icu(name='insarapp_filter_icu')
    icu.configure()
    icu.unwrappingFlag = False
    icu.icu(intImage=filtImage, ampImage=ampImage, phsigImage=phsigImage)

    phsigImage.renderHdr()

    filtImage.finalizeImage()
    ampImage.finalizeImage()
    phsigImage.finalizeImage()

    del filtImage
    del ampImage
    del phsigImage
    del icu

    ############################################################
    # STEP 3. mask filtered interferogram using water body
    ############################################################
    print('\nmask filtered interferogram using: {}'.format(
        self._insar.multilookWbdOut))

    if self.waterBodyMaskStartingStep == 'filt':
        if not os.path.exists(self._insar.multilookWbdOut):
            catalog.addItem(
                'warning message',
                'requested masking interferogram with water body, but water body does not exist',
                'runFilt')
        else:
            wbd = np.fromfile(self._insar.multilookWbdOut,
                              dtype=np.int8).reshape(length, width)
            phsig = np.memmap(self._insar.multilookPhsig,
                              dtype='float32',
                              mode='r+',
                              shape=(length, width))
            phsig[np.nonzero(wbd == -1)] = 0
            del phsig
            filt = np.memmap(self._insar.filteredInterferogram,
                             dtype='complex64',
                             mode='r+',
                             shape=(length, width))
            filt[np.nonzero(wbd == -1)] = 0
            del filt
            del wbd

    os.chdir('../')

    catalog.printToLog(logger, "runFilt")
    self._insar.procDoc.addAllFromCatalog(catalog)
Ejemplo n.º 2
0
    #os.makedirs(insarDir, exist_ok=True)
    os.chdir(insarDir)

    if not os.path.isfile(ionosphereReference):
        raise Exception(
            'ionospheric phase file: {} of reference date does not exist in {}.\n'
            .format(os.path.basename(ionosphereReference), ion_dir))
    if not os.path.isfile(ionosphereSecondary):
        raise Exception(
            'ionospheric phase file: {} of secondary date does not exist in {}.\n'
            .format(os.path.basename(ionosphereSecondary), ion_dir))

    #correct interferogram
    if os.path.isfile(multilookDifferentialInterferogramOriginal):
        print('original interferogram: {} is already here, do not rename: {}'.
              format(multilookDifferentialInterferogramOriginal,
                     multilookDifferentialInterferogram))
    else:
        print('renaming {} to {}'.format(
            multilookDifferentialInterferogram,
            multilookDifferentialInterferogramOriginal))
        renameFile(multilookDifferentialInterferogram,
                   multilookDifferentialInterferogramOriginal)

    cmd = "imageMath.py -e='a*exp(-1.0*J*(b-c))' --a={} --b={} --c={} -s BIP -t cfloat -o {}".format(
        multilookDifferentialInterferogramOriginal, ionosphereReference,
        ionosphereSecondary, multilookDifferentialInterferogram)
    runCmd(cmd)

    os.chdir('../')
Ejemplo n.º 3
0
def runIonFilt(self):
    '''compute and filter ionospheric phase
    '''
    catalog = isceobj.Catalog.createCatalog(self._insar.procDoc.name)
    self.updateParamemetersFromUser()

    if not self.doIon:
        catalog.printToLog(logger, "runIonFilt")
        self._insar.procDoc.addAllFromCatalog(catalog)
        return

    masterTrack = self._insar.loadTrack(master=True)
    slaveTrack = self._insar.loadTrack(master=False)

    from isceobj.Alos2Proc.runIonSubband import defineIonDir
    ionDir = defineIonDir()
    subbandPrefix = ['lower', 'upper']

    ionCalDir = os.path.join(ionDir['ion'], ionDir['ionCal'])
    if not os.path.exists(ionCalDir):
        os.makedirs(ionCalDir)
    os.chdir(ionCalDir)


    ############################################################
    # STEP 1. compute ionospheric phase
    ############################################################
    from isceobj.Constants import SPEED_OF_LIGHT
    from isceobj.Alos2Proc.Alos2ProcPublic import create_xml

    ###################################
    #SET PARAMETERS HERE
    #THESE SHOULD BE GOOD ENOUGH, NO NEED TO SET IN setup(self)
    corThresholdAdj = 0.85
    ###################################

    print('\ncomputing ionosphere')
    #get files
    ml2 = '_{}rlks_{}alks'.format(self._insar.numberRangeLooks1*self._insar.numberRangeLooksIon, 
                              self._insar.numberAzimuthLooks1*self._insar.numberAzimuthLooksIon)

    lowerUnwfile = subbandPrefix[0]+ml2+'.unw'
    upperUnwfile = subbandPrefix[1]+ml2+'.unw'
    corfile = 'diff'+ml2+'.cor'

    #use image size from lower unwrapped interferogram
    img = isceobj.createImage()
    img.load(lowerUnwfile + '.xml')
    width = img.width
    length = img.length

    lowerUnw = (np.fromfile(lowerUnwfile, dtype=np.float32).reshape(length*2, width))[1:length*2:2, :]
    upperUnw = (np.fromfile(upperUnwfile, dtype=np.float32).reshape(length*2, width))[1:length*2:2, :]
    cor = (np.fromfile(corfile, dtype=np.float32).reshape(length*2, width))[1:length*2:2, :]
    #amp = (np.fromfile(corfile, dtype=np.float32).reshape(length*2, width))[0:length*2:2, :]

    #masked out user-specified areas
    if self.maskedAreasIon != None:
        maskedAreas = reformatMaskedAreas(self.maskedAreasIon, length, width)
        for area in maskedAreas:
            lowerUnw[area[0]:area[1], area[2]:area[3]] = 0
            upperUnw[area[0]:area[1], area[2]:area[3]] = 0
            cor[area[0]:area[1], area[2]:area[3]] = 0

    #compute ionosphere
    fl = SPEED_OF_LIGHT / self._insar.subbandRadarWavelength[0]
    fu = SPEED_OF_LIGHT / self._insar.subbandRadarWavelength[1]
    adjFlag = 1
    ionos = computeIonosphere(lowerUnw, upperUnw, cor, fl, fu, adjFlag, corThresholdAdj, 0)

    #dump ionosphere
    ionfile = 'ion'+ml2+'.ion'
    # ion = np.zeros((length*2, width), dtype=np.float32)
    # ion[0:length*2:2, :] = amp
    # ion[1:length*2:2, :] = ionos
    # ion.astype(np.float32).tofile(ionfile)
    # img.filename = ionfile
    # img.extraFilename = ionfile + '.vrt'
    # img.renderHdr()

    ionos.astype(np.float32).tofile(ionfile)
    create_xml(ionfile, width, length, 'float')


    ############################################################
    # STEP 2. filter ionospheric phase
    ############################################################

    #################################################
    #SET PARAMETERS HERE
    #if applying polynomial fitting
    #False: no fitting, True: with fitting
    fit = self.fitIon
    #gaussian filtering window size
    size_max = self.filteringWinsizeMaxIon
    size_min = self.filteringWinsizeMinIon

    #THESE SHOULD BE GOOD ENOUGH, NO NEED TO SET IN setup(self)
    corThresholdIon = 0.85
    #################################################

    print('\nfiltering ionosphere')
    ionfile = 'ion'+ml2+'.ion'
    corfile = 'diff'+ml2+'.cor'
    ionfiltfile = 'filt_ion'+ml2+'.ion'

    img = isceobj.createImage()
    img.load(ionfile + '.xml')
    width = img.width
    length = img.length
    #ion = (np.fromfile(ionfile, dtype=np.float32).reshape(length*2, width))[1:length*2:2, :]
    ion = np.fromfile(ionfile, dtype=np.float32).reshape(length, width)
    cor = (np.fromfile(corfile, dtype=np.float32).reshape(length*2, width))[1:length*2:2, :]
    #amp = (np.fromfile(ionfile, dtype=np.float32).reshape(length*2, width))[0:length*2:2, :]

    #masked out user-specified areas
    if self.maskedAreasIon != None:
        maskedAreas = reformatMaskedAreas(self.maskedAreasIon, length, width)
        for area in maskedAreas:
            ion[area[0]:area[1], area[2]:area[3]] = 0
            cor[area[0]:area[1], area[2]:area[3]] = 0

    #remove possible wired values in coherence
    cor[np.nonzero(cor<0)] = 0.0
    cor[np.nonzero(cor>1)] = 0.0

    # #applying water body mask here
    # waterBodyFile = 'wbd'+ml2+'.wbd'
    # if os.path.isfile(waterBodyFile):
    #     print('applying water body mask to coherence used to compute ionospheric phase')
    #     wbd = np.fromfile(waterBodyFile, dtype=np.int8).reshape(length, width)
    #     cor[np.nonzero(wbd!=0)] = 0.00001

    if fit:
        ion_fit = weight_fitting(ion, cor, width, length, 1, 1, 1, 1, 2, corThresholdIon)
        ion -= ion_fit * (ion!=0)

    #minimize the effect of low coherence pixels
    #cor[np.nonzero( (cor<0.85)*(cor!=0) )] = 0.00001
    #filt = adaptive_gaussian(ion, cor, size_max, size_min)
    #cor**14 should be a good weight to use. 22-APR-2018
    filt = adaptive_gaussian(ion, cor**14, size_max, size_min)

    if fit:
        filt += ion_fit * (filt!=0)

    # ion = np.zeros((length*2, width), dtype=np.float32)
    # ion[0:length*2:2, :] = amp
    # ion[1:length*2:2, :] = filt
    # ion.astype(np.float32).tofile(ionfiltfile)
    # img.filename = ionfiltfile
    # img.extraFilename = ionfiltfile + '.vrt'
    # img.renderHdr()

    filt.astype(np.float32).tofile(ionfiltfile)
    create_xml(ionfiltfile, width, length, 'float')


    ############################################################
    # STEP 3. resample ionospheric phase
    ############################################################
    from contrib.alos2proc_f.alos2proc_f import rect
    from isceobj.Alos2Proc.Alos2ProcPublic import create_xml
    from scipy.interpolate import interp1d
    import shutil

    #################################################
    #SET PARAMETERS HERE
    #interpolation method
    interpolationMethod = 1
    #################################################

    print('\ninterpolate ionosphere')

    ml3 = '_{}rlks_{}alks'.format(self._insar.numberRangeLooks1*self._insar.numberRangeLooks2, 
                              self._insar.numberAzimuthLooks1*self._insar.numberAzimuthLooks2)

    ionfiltfile = 'filt_ion'+ml2+'.ion'
    #ionrectfile = 'filt_ion'+ml3+'.ion'
    ionrectfile = self._insar.multilookIon

    img = isceobj.createImage()
    img.load(ionfiltfile + '.xml')
    width2 = img.width
    length2 = img.length

    img = isceobj.createImage()
    img.load(os.path.join('../../', ionDir['insar'], self._insar.multilookDifferentialInterferogram) + '.xml')
    width3 = img.width
    length3 = img.length

    #number of range looks output
    nrlo = self._insar.numberRangeLooks1*self._insar.numberRangeLooks2
    #number of range looks input
    nrli = self._insar.numberRangeLooks1*self._insar.numberRangeLooksIon
    #number of azimuth looks output
    nalo = self._insar.numberAzimuthLooks1*self._insar.numberAzimuthLooks2
    #number of azimuth looks input
    nali = self._insar.numberAzimuthLooks1*self._insar.numberAzimuthLooksIon

    if (self._insar.numberRangeLooks2 != self._insar.numberRangeLooksIon) or \
       (self._insar.numberAzimuthLooks2 != self._insar.numberAzimuthLooksIon):
        #this should be faster using fortran
        if interpolationMethod == 0:
            rect(ionfiltfile, ionrectfile,
                width2,length2,
                width3,length3,
                nrlo/nrli, 0.0,
                0.0, nalo/nali,
                (nrlo-nrli)/(2.0*nrli),
                (nalo-nali)/(2.0*nali),
                'REAL','Bilinear')
        #finer, but slower method
        else:
            ionfilt = np.fromfile(ionfiltfile, dtype=np.float32).reshape(length2, width2)
            index2 = np.linspace(0, width2-1, num=width2, endpoint=True)
            index3 = np.linspace(0, width3-1, num=width3, endpoint=True) * nrlo/nrli + (nrlo-nrli)/(2.0*nrli)
            ionrect = np.zeros((length3, width3), dtype=np.float32)
            for i in range(length2):
                f = interp1d(index2, ionfilt[i,:], kind='cubic', fill_value="extrapolate")
                ionrect[i, :] = f(index3)
            
            index2 = np.linspace(0, length2-1, num=length2, endpoint=True)
            index3 = np.linspace(0, length3-1, num=length3, endpoint=True) * nalo/nali + (nalo-nali)/(2.0*nali)
            for j in range(width3):
                f = interp1d(index2, ionrect[0:length2, j], kind='cubic', fill_value="extrapolate")
                ionrect[:, j] = f(index3)
            ionrect.astype(np.float32).tofile(ionrectfile)
            del ionrect
        create_xml(ionrectfile, width3, length3, 'float')

        os.rename(ionrectfile, os.path.join('../../insar', ionrectfile))
        os.rename(ionrectfile+'.vrt', os.path.join('../../insar', ionrectfile)+'.vrt')
        os.rename(ionrectfile+'.xml', os.path.join('../../insar', ionrectfile)+'.xml')
        os.chdir('../../insar')
    else:
        shutil.copyfile(ionfiltfile, os.path.join('../../insar', ionrectfile))
        os.chdir('../../insar')
        create_xml(ionrectfile, width3, length3, 'float')
    #now we are in 'insar'


    ############################################################
    # STEP 4. correct interferogram
    ############################################################
    from isceobj.Alos2Proc.Alos2ProcPublic import renameFile
    from isceobj.Alos2Proc.Alos2ProcPublic import runCmd

    if self.applyIon:
        print('\ncorrect interferogram')
        if os.path.isfile(self._insar.multilookDifferentialInterferogramOriginal):
            print('original interferogram: {} is already here, do not rename: {}'.format(self._insar.multilookDifferentialInterferogramOriginal, self._insar.multilookDifferentialInterferogram))
        else:
            print('renaming {} to {}'.format(self._insar.multilookDifferentialInterferogram, self._insar.multilookDifferentialInterferogramOriginal))
            renameFile(self._insar.multilookDifferentialInterferogram, self._insar.multilookDifferentialInterferogramOriginal)

        cmd = "imageMath.py -e='a*exp(-1.0*J*b)' --a={} --b={} -s BIP -t cfloat -o {}".format(
            self._insar.multilookDifferentialInterferogramOriginal,
            self._insar.multilookIon,
            self._insar.multilookDifferentialInterferogram)
        runCmd(cmd)
    else:
        print('\nionospheric phase estimation finished, but correction of interfeorgram not requested')

    os.chdir('../')

    catalog.printToLog(logger, "runIonFilt")
    self._insar.procDoc.addAllFromCatalog(catalog)
Ejemplo n.º 4
0
def runIonCorrect(self):
    '''resample original ionosphere and ionospheric correction
    '''
    if hasattr(self, 'doInSAR'):
        if not self.doInSAR:
            return

    catalog = isceobj.Catalog.createCatalog(self._insar.procDoc.name)
    self.updateParamemetersFromUser()

    if not self.doIon:
        catalog.printToLog(logger, "runIonCorrect")
        self._insar.procDoc.addAllFromCatalog(catalog)
        return

    referenceTrack = self._insar.loadTrack(reference=True)
    secondaryTrack = self._insar.loadTrack(reference=False)

    from isceobj.Alos2Proc.runIonSubband import defineIonDir
    ionDir = defineIonDir()
    subbandPrefix = ['lower', 'upper']

    ionCalDir = os.path.join(ionDir['ion'], ionDir['ionCal'])
    os.makedirs(ionCalDir, exist_ok=True)
    os.chdir(ionCalDir)

    ############################################################
    # STEP 3. resample ionospheric phase
    ############################################################
    from contrib.alos2proc_f.alos2proc_f import rect
    from isceobj.Alos2Proc.Alos2ProcPublic import create_xml
    from scipy.interpolate import interp1d
    import shutil

    #################################################
    #SET PARAMETERS HERE
    #interpolation method
    interpolationMethod = 1
    #################################################

    print('\ninterpolate ionosphere')

    ml2 = '_{}rlks_{}alks'.format(
        self._insar.numberRangeLooks1 * self._insar.numberRangeLooksIon,
        self._insar.numberAzimuthLooks1 * self._insar.numberAzimuthLooksIon)

    ml3 = '_{}rlks_{}alks'.format(
        self._insar.numberRangeLooks1 * self._insar.numberRangeLooks2,
        self._insar.numberAzimuthLooks1 * self._insar.numberAzimuthLooks2)

    ionfiltfile = 'filt_ion' + ml2 + '.ion'
    #ionrectfile = 'filt_ion'+ml3+'.ion'
    ionrectfile = self._insar.multilookIon

    img = isceobj.createImage()
    img.load(ionfiltfile + '.xml')
    width2 = img.width
    length2 = img.length

    img = isceobj.createImage()
    img.load(
        os.path.join('../../', ionDir['insar'],
                     self._insar.multilookDifferentialInterferogram) + '.xml')
    width3 = img.width
    length3 = img.length

    #number of range looks output
    nrlo = self._insar.numberRangeLooks1 * self._insar.numberRangeLooks2
    #number of range looks input
    nrli = self._insar.numberRangeLooks1 * self._insar.numberRangeLooksIon
    #number of azimuth looks output
    nalo = self._insar.numberAzimuthLooks1 * self._insar.numberAzimuthLooks2
    #number of azimuth looks input
    nali = self._insar.numberAzimuthLooks1 * self._insar.numberAzimuthLooksIon

    if (self._insar.numberRangeLooks2 != self._insar.numberRangeLooksIon) or \
       (self._insar.numberAzimuthLooks2 != self._insar.numberAzimuthLooksIon):
        #this should be faster using fortran
        if interpolationMethod == 0:
            rect(ionfiltfile, ionrectfile, width2, length2, width3, length3,
                 nrlo / nrli, 0.0, 0.0, nalo / nali,
                 (nrlo - nrli) / (2.0 * nrli), (nalo - nali) / (2.0 * nali),
                 'REAL', 'Bilinear')
        #finer, but slower method
        else:
            ionfilt = np.fromfile(ionfiltfile,
                                  dtype=np.float32).reshape(length2, width2)
            index2 = np.linspace(0, width2 - 1, num=width2, endpoint=True)
            index3 = np.linspace(0, width3 - 1, num=width3, endpoint=True
                                 ) * nrlo / nrli + (nrlo - nrli) / (2.0 * nrli)
            ionrect = np.zeros((length3, width3), dtype=np.float32)
            for i in range(length2):
                f = interp1d(index2,
                             ionfilt[i, :],
                             kind='cubic',
                             fill_value="extrapolate")
                ionrect[i, :] = f(index3)

            index2 = np.linspace(0, length2 - 1, num=length2, endpoint=True)
            index3 = np.linspace(0, length3 - 1, num=length3, endpoint=True
                                 ) * nalo / nali + (nalo - nali) / (2.0 * nali)
            for j in range(width3):
                f = interp1d(index2,
                             ionrect[0:length2, j],
                             kind='cubic',
                             fill_value="extrapolate")
                ionrect[:, j] = f(index3)
            ionrect.astype(np.float32).tofile(ionrectfile)
            del ionrect
        create_xml(ionrectfile, width3, length3, 'float')

        os.rename(ionrectfile, os.path.join('../../insar', ionrectfile))
        os.rename(ionrectfile + '.vrt',
                  os.path.join('../../insar', ionrectfile) + '.vrt')
        os.rename(ionrectfile + '.xml',
                  os.path.join('../../insar', ionrectfile) + '.xml')
        os.chdir('../../insar')
    else:
        shutil.copyfile(ionfiltfile, os.path.join('../../insar', ionrectfile))
        os.chdir('../../insar')
        create_xml(ionrectfile, width3, length3, 'float')
    #now we are in 'insar'

    ############################################################
    # STEP 4. correct interferogram
    ############################################################
    from isceobj.Alos2Proc.Alos2ProcPublic import renameFile
    from isceobj.Alos2Proc.Alos2ProcPublic import runCmd

    if self.applyIon:
        print('\ncorrect interferogram')
        if os.path.isfile(
                self._insar.multilookDifferentialInterferogramOriginal):
            print(
                'original interferogram: {} is already here, do not rename: {}'
                .format(self._insar.multilookDifferentialInterferogramOriginal,
                        self._insar.multilookDifferentialInterferogram))
        else:
            print('renaming {} to {}'.format(
                self._insar.multilookDifferentialInterferogram,
                self._insar.multilookDifferentialInterferogramOriginal))
            renameFile(self._insar.multilookDifferentialInterferogram,
                       self._insar.multilookDifferentialInterferogramOriginal)

        cmd = "imageMath.py -e='a*exp(-1.0*J*b)' --a={} --b={} -s BIP -t cfloat -o {}".format(
            self._insar.multilookDifferentialInterferogramOriginal,
            self._insar.multilookIon,
            self._insar.multilookDifferentialInterferogram)
        runCmd(cmd)
    else:
        print(
            '\nionospheric phase estimation finished, but correction of interfeorgram not requested'
        )

    os.chdir('../')

    catalog.printToLog(logger, "runIonCorrect")
    self._insar.procDoc.addAllFromCatalog(catalog)