示例#1
0
def frankotchellappaiter2(dzdx, dzdy):
    '''frankotchellappaiter2(dzdx,dzdy):
    Ex:
    dzdx,dzdy=insar.cpxgradient(pf)
    uw=basic.plot.frankotchellappaiter2(dzdy,dzdx);
    matshow(angle(pf*exp(-1j*uwxy)));
    '''
    import kabum
    z = kabum.frankotchellappa(dzdx, dzdy)
    gy, gx = np.gradient(z)
    rx = basic.nonaninf(gx / dzdx).mean()
    ry = basic.nonaninf(gy / dzdy).mean()
    z = kabum.frankotchellappa(dzdx / rx, dzdy / ry)
    gy, gx = np.gradient(z)

    return z
示例#2
0
def frankotchellappaiter2(dzdx,dzdy):
    '''frankotchellappaiter2(dzdx,dzdy):
    Ex:
    dzdx,dzdy=insar.cpxgradient(pf)
    uw=basic.plot.frankotchellappaiter2(dzdy,dzdx);
    matshow(angle(pf*exp(-1j*uwxy)));
    '''
    import kabum
    z=kabum.frankotchellappa(dzdx,dzdy);
    gy,gx=np.gradient(z);
    rx=basic.nonaninf(gx/dzdx).mean()
    ry=basic.nonaninf(gy/dzdy).mean()
    z=kabum.frankotchellappa(dzdx/rx,dzdy/ry);
    gy,gx=np.gradient(z);
    
    return z
示例#3
0
def matshowClick(A, value=True, vmin=None, vmax=None):
    def onclick(event):
        try:
            y=np.round(event.xdata);
        except:
            return
        x=np.round(event.ydata);
        if value==True:          
            print (x,y, A[x,y])
        else:
            print (x,y)
        
    s=basic.nonaninf(A).std();
    m=basic.nonaninf(A).mean();
    if vmin is None:
        vmin=m-2*s
    if vmax is None:
        vmax=m+2*s
            
    fig=P.figure();
    ax=fig.add_subplot(111);ax.matshow(A, vmin=vmin, vmax=vmax);
    fig.canvas.mpl_connect('button_press_event', onclick);
    return fig