create_Rayleigh

pyspeckle.pyspeckle.create_Rayleigh(N, pix_per_speckle, alpha=1, shape='ellipse')[source]

Generate an 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 horizontal width to vertical width

  • shape – ‘ellipse’ or ‘rectangle’ describing the laser shape

Returns

M x M speckle image