-
Notifications
You must be signed in to change notification settings - Fork 5
Phase Screen Generation
One of the core features of WavePy is its generation of random phase screens. The primary use of these phase screens is as an approximation of a turbulent volume along a propagation path. WavePy can generate phase screens in two parts: the standard FFT-based screen and the sub-harmonic enhancement. Below an instantiation and use of example for phase screen generation can be seen:
# Instantiate a default WavePy object
LongRangeImaging = wavepy.wavepy() This instance of WavePy has the default simulation characteristics visible in the repo and in the default simulation example.
The next step involves setting the turbulence strength parameter by matching the Fried coherence length to the equivalent Kolmogorov value.
# Set Turbulence strength parameter
LongRangeImaging.SetCn2Rytov(0.1) This function uses a desired rytov number for calculation. The default simulation has a Cn2 value of 1e-16 and this is used to calculate a corresponding rytov number, but it is often of interest to change the rytov number when generate screens for validation or testing.
The last step is the actual generation. Below is an example of generation of a single basic phase screen, asingle sub-harmonic enhancement, and their combination.
# Generation of phase screen
phz_hi = LongRangeImaging.PhaseScreen()
#FFT-based phase screens
phz_lo = LongRangeImaging.SubHarmonicComp(5)
#sub harmonics
phz = phz_lo + phz_hi
#Component additionBelow is an output example of the generated screen:
The addition of multiple iterations or screens may also be wanted and it is as simple as a nested loop for each:
# Iteration and multi-screen approach
for iter in range(0, numberOfIterations,1):
for idxscr in range(0,LongRangeImaging.NumScr,1):
phz_hi[:,:,idxscr] = LongRangeImaging.PhaseScreen()
#FFT-based phase screens
phz_lo[:,:,idxscr] = LongRangeImaging.SubHarmonicComp(5)
#sub harmonics
phz[:,:,idxscr] = phz_lo[:,:,idxscr] + phz_hi[:,:,idxscr]
#subharmonic compensated phase screensIn the above multiple iterations of phase screen generation are run to achieve a number of random samples(numberOfOterations) for a specific scenario. Within the iterations loop, the screen loop is used to generate multiple screens(LongRangeImaging.NumScr) along the chosen path.
