dtmm.window

Window functions.

Module Contents

dtmm.window.blackman(shape, out=None)

Returns a blacman window of a given shape.

Parameters
  • shape ((int,int)) – A shape of the 2D window.

  • out (ndarray, optional) – Output array.

Returns

window – A Blackman window

Return type

ndarray

dtmm.window.gaussian(shape, waist)

Gaussian amplitude window function.

Parameters
  • shape ((int,int)) – A shape of the 2D window

  • waist (float) – Waist of the gaussian.

Returns

window – Gaussian beam window

Return type

ndarray

dtmm.window.gaussian_beam(shape, waist, k0, z=0.0, n=1)

Returns gaussian beam window function.

Parameters
  • shape ((int,int)) – A shape of the 2D window

  • waist (float) – Waist of the beam

  • k0 (float) – Wavenumber

  • z (float, optional) – The z-position of waist (0. by default)

  • n (float, optional) – Refractive index (1. by default)

  • out (ndarray, optional) – Output array.

Returns

window – Gaussian beam window

Return type

ndarray

dtmm.window.aperture(shape, diameter=1.0, smooth=0.05, out=None)

Returns aperture window function.

Aperture is basically a tukey filter with a given diameter

Parameters
  • shape ((int,int)) – A shape of the 2D window

  • diameter (float) – Width of the aperture (1. for max height/width)

  • smooth (float) – Smoothnes parameter - defines smoothness of the edge of the aperture (should be between 0. and 1.; 0.05 by default)

  • out (ndarray, optional) – Output array.

Returns

window – Aperture window

Return type

ndarray