From 2e28024227c31952ff900468b25200e05f9f7faa Mon Sep 17 00:00:00 2001 From: "Chimitt, Nicholas M" Date: Tue, 27 Jul 2021 14:58:26 -0400 Subject: [PATCH] Delete TiltOnly.py --- Turbulence_Sim_v1_python/TiltOnly.py | 32 ---------------------------- 1 file changed, 32 deletions(-) delete mode 100644 Turbulence_Sim_v1_python/TiltOnly.py diff --git a/Turbulence_Sim_v1_python/TiltOnly.py b/Turbulence_Sim_v1_python/TiltOnly.py deleted file mode 100644 index ab40764..0000000 --- a/Turbulence_Sim_v1_python/TiltOnly.py +++ /dev/null @@ -1,32 +0,0 @@ -from matplotlib import pyplot as plt -import numpy as np -import utilities as util - -''' -This script shows an example case of a tilt-only simulation. Tilt-only is useful when when is considering worst case -latent effects of shifting, study of spatial statistics, etc. The parameters given are standard parameters for such -a simulation, and are infact very similar to its "full" simulation counterpart. -''' - - -def rgb2gray(rgb): - return np.dot(rgb[...,:3], [0.2989, 0.5870, 0.1140]) - - -img = rgb2gray(plt.imread('chart.png')) -N = 225 # size of the image -- assumed to be square (pixels) -D = 0.1 # length of aperture diameter (meters) -L = 7000 # length of propagation (meters) -r0 = D/2 # the Fried parameter r0. Most importantly, the denominator is the desired D/r0 ratio -wvl = 0.5e-6 # the mean wavelength -- typically somewhere suitably in the middle of the spectrum will be sufficient - -param_obj = util.p_obj(N, D, L, r0, wvl) # generating the parameter object, some other things are computed within this - # function, see the def for details -S = util.gen_PSD(param_obj) # finding the PSD, see the def for details -param_obj['S'] = S # appending the PSD to the parameter object for convenience - -for i in range(100): - img_, _ = util.genTiltImg(img, param_obj) # generating the tilt-only image - - plt.imshow(img_,cmap='gray',vmin=0,vmax=1) - plt.show() \ No newline at end of file