Example #1
0
def MakeAGrid(name, dir):
    dat = rd.Data_Level1(name, dir)
    dat.OneStep()
    GCP = dat.GCPs
    SigmaNaught = dat.denoiseNRCS
    y_lim, x_lim = SigmaNaught.shape
    del dat, SigmaNaught
    n = 10
    gm.AllLonLat('Base', x_lim, y_lim, GCP, n)
    return None
Example #2
0
def OtherLayer(d, n):
    for indice in range(n, len(d.series)):
        temp = rd.Data_Level1(d.series[indice], d.FList[indice])
        temp.OneStep()
        GCP = temp.GCPs
        SigmaNaught = temp.denoiseNRCS
        name = 'Layer' + str(indice) + '-' + d.series[indice]
        del temp
        y1, x1 = SigmaNaught.shape
        gm.AllLonLat(name, x1, y1, GCP, 5)
        start = time.time()
        SigmaNaught = Lc.Resize_SigmaNaught(SigmaNaught, 5)
        print('Time for resize SigmaNaught:', (time.time() - start) / 60,
              'mins')
        Sigma_N, nums_arr = gm.GridSigmaNaught(SigmaNaught)
        print('Time for resampling 1 SAR image:', (time.time() - start) / 60,
              'mins')
        jo.Matrix_save(Sigma_N, name, layer_root)
    return None
Example #3
0
def Resample(n, mode='uniform'):
    d = rd.SentinelData()
    d.Get_List(file_root)
    m = 1  # resize factor
    for indice in range(n, len(d.series)):
        stt = time.time()
        temp = rd.Data_Level1(d.series[indice], d.FList[indice])
        temp.OneStep()
        GCP = temp.GCPs
        SigmaNaught = temp.denoiseNRCS
        name = 'Layer' + str(indice) + '-' + d.series[indice]
        del temp
        y1, x1 = SigmaNaught.shape
        sub_img, up_left = cod.N_sub(tempN, SigmaNaught)
        del SigmaNaught, up_left
        jo.NMatrix_save(sub_img, 'SigmaNaught', temp_root)
        del sub_img
        md2.AllLonLat(name, x1, y1, GCP, m)
        img, pixel_num = md2.GridLL_SigmaNaught(mode)
        jo.Matrix_save(img, name, layer_root)
        jo.Matrix_save(pixel_num, name + '-distribution', layer_root)
        print('1 image:', (time.time() - stt) / 60, 'mins')
        print('Done!\n')
    return None