Example #1
0
def timeseries2ifgram(ts_sim, date_list, date12_list, wvl=0.055, display=False, ax=None):
    """re-construct a stack of interferometric phase from a time-series
    Parameters: ts_sim      - 1D np.ndarray in size of (num_date,) in unit of m
                date_list   - list of str in YYYYMMDD in size of (num_date,)
                date12_list - list of str in YYYYMMDD_YYYYMMDD in size of (num_ifg,)
                wvl         - float, wavelength in m
                display     - bool, display the reconstruction result
                ax          - matplotlib.axes object, for display
    Returns:    ifgram_sim  - 1D np.ndarray in size of (num_ifg) in unit of radian
    """
    range2phase = -4.0 * np.pi / wvl
    num_ifgram = len(date12_list)
    ifgram_sim = np.zeros((num_ifgram,1), np.float32)
    for i in range(num_ifgram):
        m_date, s_date = date12_list[i].split('_')
        m_idx = date_list.index(m_date)
        s_idx = date_list.index(s_date)
        ifgram_sim[i] = ts_sim[s_idx] - ts_sim[m_idx]
    ifgram_sim *= range2phase

    if display:
        if not ax:
            fig, ax = plt.subplots(nrows=1, ncols=1)
        else:
            fig = None
        ifgram_sim_mat = pnet.coherence_matrix(date12_list, ifgram_sim)
        im = ax.imshow(ifgram_sim_mat, cmap='jet', interpolation='nearest')
        ax.set_xlabel('image number')
        ax.set_ylabel('image number')
        ax.set_title('interferometric phase')
        cbar = plt.colorbar(im, ax=ax)
        cbar.set_label('phase [rad]')
        if fig is not None:
            plt.show()
    return ifgram_sim
Example #2
0
def timeseries2ifgram(ts_sim,
                      date_list,
                      date12_list,
                      wvl=0.055,
                      display=False):
    range2phase = -4.0 * np.pi / wvl
    num_ifgram = len(date12_list)
    ifgram_sim = np.zeros((num_ifgram, 1), np.float32)
    for i in range(num_ifgram):
        m_date, s_date = date12_list[i].split('_')
        m_idx = date_list.index(m_date)
        s_idx = date_list.index(s_date)
        ifgram_sim[i] = ts_sim[s_idx] - ts_sim[m_idx]
    ifgram_sim *= range2phase

    if display:
        ifgram_sim_mat = pnet.coherence_matrix(date12_list, ifgram_sim)
        plt.figure()
        plt.imshow(ifgram_sim_mat, cmap='jet')
        plt.xlabel('Image number')
        plt.ylabel('Image number')
        cbar = plt.colorbar()
        cbar.set_label('Phase (radian)')
        plt.title('Interferometric Phase')
        plt.show()
    return ifgram_sim
Example #3
0
def simulate_decorrelation_noises(date12_list, cohs, L=20, size:int=1, display=False, scale=1.0):
    '''Simuate decorrelation phase noise for input interferometric pairs
    Inputs:
        date12_list - list of string in YYMMDD-YYMMDD format, indicating pairs configuration
        cohs - 2D np.array in size of (ifgram_num,1)
        L    - int, multilook number
    Output:
        decorNoises - 2D np.array in size of (ifgram_num, 1)
    Example:
        from mintpy.utils import network as pnet
        date12_list_all = pnet.get_date12_list('ifgram_list_all.txt')
        cohs = pnet.simulate_coherence(date12_list_all, decor_time=1000, coh_resid=0.2, display=True, inc_angle=22.8)
        decorNoises = simulate_decorrelation_noises(date12_list_all, cohs, L=20, display=True)
    '''
    ifgram_num = len(cohs)
    decorNoises = np.zeros((ifgram_num, size), np.float32)
    for i in range(ifgram_num):
        decorNoises[i, :] = sample_decorrelation_phase(int(L), cohs[i], size=size, scale=scale)

    if display:
        decorNoisesMat = pnet.coherence_matrix(date12_list, decorNoises)
        plt.figure()
        #plt.imshow(decorNoisesMat, vmin=-np.pi, vmax=np.pi, cmap='jet')
        plt.imshow(decorNoisesMat, cmap='jet')
        plt.xlabel('Image number')
        plt.ylabel('Image number')
        cbar = plt.colorbar()
        cbar.set_label('Decorrelation Phase Noise (radian)')
        plt.title('Decorrelation Noise')
        plt.show()
    return decorNoises
Example #4
0
def timeseries2ifgram(ts_sim, date_list, date12_list, wvl=0.055, display=False):
    range2phase = -4.0 * np.pi / wvl
    num_ifgram = len(date12_list)
    ifgram_sim = np.zeros((num_ifgram,1), np.float32)
    for i in range(num_ifgram):
        m_date, s_date = date12_list[i].split('_')
        m_idx = date_list.index(m_date)
        s_idx = date_list.index(s_date)
        ifgram_sim[i] = ts_sim[s_idx] - ts_sim[m_idx]
    ifgram_sim *= range2phase

    if display:
        ifgram_sim_mat = pnet.coherence_matrix(date12_list, ifgram_sim)
        plt.figure()
        plt.imshow(ifgram_sim_mat, cmap='jet')
        plt.xlabel('Image number')
        plt.ylabel('Image number')
        cbar = plt.colorbar()
        cbar.set_label('Phase (radian)')
        plt.title('Interferometric Phase')
        plt.show()
    return ifgram_sim