def tot_L(r_u, r_v, r_h, tau, eta):
    tau = tau[0, :]
    eta = eta[:, 0]
    Lu = np.array(sc.integral_lenght_scale(r_u, tau, eta))
    Lv = np.array(sc.integral_lenght_scale(r_v, tau, eta))
    Lh = np.array(sc.integral_lenght_scale(r_h, tau, eta))
    return np.r_[Lu, Lv, Lh]
예제 #2
0
        ruvi = np.vstack([
            sc.autocorr_interp_sq(r, t, e, tau_lin=taui, eta_lin=etai)[2].T
            for t, e, r in zip(tau_list, eta_list, ruv_list)
        ])

        ru_mean = np.nanmean(rui.reshape(
            (int(len(rui) / (N + 1)), N + 1, N + 1)),
                             axis=0)
        rv_mean = np.nanmean(rvi.reshape(
            (int(len(rvi) / (N + 1)), N + 1, N + 1)),
                             axis=0)
        ruv_mean = np.nanmean(ruvi.reshape(
            (int(len(ruvi) / (N + 1)), N + 1, N + 1)),
                              axis=0)

        Luxm, Luym = sc.integral_lenght_scale(ru_mean, taui[0, :], etai[:, 0])
        Lvxm, Lvym = sc.integral_lenght_scale(rv_mean, taui[0, :], etai[:, 0])
        Lhxm, Lhym = sc.integral_lenght_scale(.5 * (ru_mean + rv_mean),
                                              taui[0, :], etai[:, 0])

        data = np.c_[taui.flatten(),
                     etai.flatten(),
                     ru_mean.flatten(),
                     rv_mean.flatten(),
                     ruv_mean.flatten()]

        times = np.repeat(t_arrayhms[i], len(taui.flatten()))
        names_ids = np.repeat(name_id, len(taui.flatten()))

        columns = ['tau', 'eta', 'ru', 'rv', 'ruv']
예제 #3
0
#plt.figure()
#plt.contourf(grid_new[0], grid_new[1], U_o, cmap='jet')
#plt.colorbar()
#plt.figure()
#plt.contourf(grid_new[0], grid_new[1], V_o, cmap='jet')
#plt.colorbar()


#########################
# Autocorreltion and length scales
U_mean = np.nanmean(Ur.flatten())
V_mean = np.nanmean(Vr.flatten())
gamma = np.arctan2(V_mean,U_mean)
tau,eta,r_u,r_v,r_uv,_,_,_,_ = sc.spatial_autocorr_sq(grid_new,Ur,Vr, 
                            transform = False, transform_r = True,gamma=gamma,e_lim=.1,refine=32)
Lu = np.array(sc.integral_lenght_scale(r_u,tau,eta))
Lv = np.array(sc.integral_lenght_scale(r_v,tau,eta))
#########################

#####################################
""" end of testing (not testing anymore though)"""
#####################################




# In[]

for dir_mean in Dir:#km5: for each direction. Do you generate different realizations by rotatiing the scanners ?  
  
    vtx0, wts0, w0, c_ref0, s_ref0, shapes,uv0_t,vu_beam_0,uv0 = sy.early_weights_pulsed(r_0_g,np.pi-phi_0_g, dl, dir_mean , tri, -d/2, y[0]/2,orig0,0,L_x,L_y)#km5: pass the local polar coordinates of the scanner0