Skip to content

Commit

Permalink
Update turbStats.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mao114 authored Jan 20, 2022
1 parent 7a64201 commit f9d1f0e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions turbStats.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,17 @@ def tilt_mat(N, D, r0, L, save_path = './data', thre = 0.002, adj = 1, use_temp
else:
np.save(os.path.join(save_path,'S_half-size_{}-D_r0_{:.4f}.npy'.format(N,D_r0)),data)


def get_r0(Cn2, L, lambda=0.5e-5):
r0 = ((0.423 * (2*np.pi/labmda)**2) * Cn2 * integrate.quad(_f,0,L,args=L)[0]) ** (-3/5)

return r0


def _f(z,L):
return (z/L)**(5/3)


def _nollToZernInd(j):
"""
Authors: Tim van Werkhoven, Jason Saredy
Expand Down

0 comments on commit f9d1f0e

Please sign in to comment.