Exemplo n.º 1
0
    #Get current directory
    currdir = os.getcwd()

    #Check if GIAnT dir exists. Create it if not.
    if os.path.isdir(inps.prepDir):
        print "{0} directory already exists".format(inps.prepDir)
    else:
        os.mkdir(inps.prepDir)

    pairs = []
    #####Get list of IFGS
    if inps.ilist in ['', None]:
        pairs = SS.getPairDirs(dirname=inps.srcDir)
    else:
        pairs = SS.pairDirs_from_file(inps.ilist, base=inps.srcDir)

    #Create ifg.list
    ifglist = os.path.join(inps.prepDir, 'ifg.list')
    xObj = None
    if (not os.path.exists(ifglist)) or inps.force:
        fid = open(ifglist, 'w')
        for pair in pairs:
            dates = os.path.basename(pair).split('_')
            print pair
            xmlFile = os.path.join(pair, 'insarProc.xml')
            xObj = OB.fromstring(open(xmlFile, 'r').read())

            try:
                bTop = xObj.baseline.perp_baseline_top
                bBot = xObj.baseline.perp_baseline_bottom
Exemplo n.º 2
0
    inps = parser.parse_args()
    return inps


if __name__ == '__main__':
    '''
    The main driver.
    '''
    inps = parse()

    currDir = os.getcwd()

    if inps.subset in ['', None]:
        pairDirs = SS.getPairDirs(dirname=inps.dirname)
    else:
        pairDirs = SS.pairDirs_from_file(inps.subset, base=inps.dirname)

    print 'Number of IFGs : ', len(pairDirs)
    print 'Start step: ', inps.start
    print 'End step: ', inps.end

    for pair in pairDirs:
        unwfile = os.path.join(pair, 'filt_topophase.unw')
        if os.path.exists(unwfile) and (not inps.force) and (inps.start !=
                                                             'geocode'):
            print 'Interferogram {0} already processed upto unwrapping'.format(
                pair)
        else:
            print 'Processing: {0}'.format(pair)

            os.chdir(pair)
Exemplo n.º 3
0
    #Get current directory
    currdir = os.getcwd()

    #Check if GIAnT dir exists. Create it if not.
    if os.path.isdir(inps['prepDir']):
        print("{0} directory already exists".format(inps['prepDir']))
    else:
        os.mkdir(inps['prepDir'])

    pairs = []
    #####Get list of IFGS
    if inps['list'] in ['', None]:
        pairs = SS.getPairDirs(dirname=inps['insarDir'])
    else:
        pairs = SS.pairDirs_from_file(inps['list'], base=inps['insarDir'])

    #Create ifg.list
    ifglist = os.path.join(inps['prepDir'], 'ifg.list')
    xObj = None
    if (not os.path.exists(ifglist)) or inps['force']:
        fid = open(ifglist, 'w')
        for pair in pairs:
            dates = os.path.basename(pair).split('_')
            xmlFile = os.path.join(pair, 'insarProc.xml')
            xObj = OB.fromstring(open(xmlFile, 'r').read())

            try:
                bTop = xObj.baseline.perp_baseline_top
                bBot = xObj.baseline.perp_baseline_bottom
                bPerp = 0.5 * (bTop + bBot)