Пример #1
0
def apply_tilt_map(a, gt, dx, dy, dz):
    x, y = geolib.get_xy_ma(a, gt)
    tilt = dx * x + dy * y + dz
    out = a - tilt
    return out, tilt
Пример #2
0
        print "Populating matrices: A=(%ix%i), b=(%i)" % (M,N,M)
        xrefa = []
        yrefa = []
        for k in range(t.size):

            #Check source
            #If ATM/LVIS, tilt and offset should be 0, increased weight on dhdt
            #Trans should have increased weight on dhdt, not tilt
            #Not trans - Remove ASP bias
            #Mono reduced weight on tilt

            #print k
            a = testn[k]
            #za should already have ref removed
            xa,ya,za = malib.get_xyz(a) 
            xam,yam = geolib.get_xy_ma(a, gt) 
            xam = xam.compressed()
            yam = yam.compressed()
            zam = a.compressed()
            #Normalize with global offset and scaling
            #xan = (xa - xref)/x.ptp()
            #yan = (ya - yref)/x.ptp()
            #xan = xa
            #yan = ya
            #Note: want to use local offset for each DEM
            #Constraints are set for individual DEMs
            #Proper tilt values can be very high if global offset is used
            xref = np.mean(xam) 
            xrefa.append(xref)
            xan = xam - xref
            yref = np.mean(yam)