create_Rayleigh_3D

pyspeckle.pyspeckle.create_Rayleigh_3D(M, pix_per_speckle, alpha=1, beta=1, shape='ellipsoid')[source]

Generate an M x M x M unpolarized speckle irradiance pattern.

The speckle pattern will have a Rayleigh distribution and results from the incoherent sum of two speckle patterns.

The resolution is specified by the parameter pix_per_speckle and refers to the smallest speckle size. Thus pix_per_speckle=2 means sampling is at the Nyquist limit and pix_per_speckle=4 will have four pixels across the smallest speckle.

Non-circular speckle is supported using alpha. This is defined as the ratio of horizontal speckle size to vertical speckle size. alpha=1 is circular and alpha=2 will have speckles that are twice as tall as they are wide.

Parameters:
  • M – dimension of desired square speckle image

  • pix_per_speckle – number of pixels per smallest speckle.

  • alpha – ratio of x to y speckle size

  • beta – ratio of x to z speckle size

  • shape – ‘cube’, ‘shell’, or ‘ellipsoid’

Returns:

M x M X M speckle image