create_gaussian_1D

pyspeckle.pyspeckle.create_gaussian_1D(M, mean, stdev, cl)[source]

Generate an array of length M of values with Gaussian autocorrelation.

The generated speckle pattern will be characterized by the autocorrelation function exp(-0.5*(x/cl)**2)

The speckle pattern will also have a normal probability density function with the specified mean and standard deviation.

The Nyquist sampling theorem sets a lower limit of the sampling frequency; M/cl must be greater than 2. However, to achieve adequate Gaussian statistics M/cl should be much larger larger than this (say more than 50).

see: <http://www.mysimlabs.com/matlab/surfgen/rsgeng1D.m>

Parameters
  • M – dimension of desired array [-]

  • mean – average value of signal [gray levels]

  • std – standard deviation of signal [gray levels]

  • cl – correlation length [# of pixels]

Returns

array of length M