5. Input Beam patterns

To simulate the light field of an incident beam of given type through a given optical medium, the following functions provide the initial conditions of the complex field, which then are propagated through the medium:

5.1. Gaussian/Bessel beams

Gaussian/Bessel beams

_images/pupil_gauss.png _images/pupil_bessel.png
biobeam.focus_field_beam_plane(shape=(128, 128), units=(0.1, 0.1), z=0.0, lam=0.5, NA=0.6, n0=1.0, ex_g=None, n_integration_steps=200)

calculates the complex 2d input field at position -z of a perfect, aberration free optical system

Parameters:
  • shape (Nx,Ny) – the 2d shape of the geometry
  • units (dx,dy) – the pixel sizes in microns
  • z (float) – defocus position in microns, such that the beam would focus at z e.g. an input field with z = 10. would hav its focus spot after 10 microns
  • lam (float) – the wavelength of light used in microns
  • NA (float/list) – the numerical aperture(s) of the illumination objective that is either a single number (for gaussian beams) or an even length list of NAs (for bessel beams), e.g. NA = [0.5,0.55] lets light through the annulus 0.5<0.55 (making a bessel beam ) or NA = [0.1,0.2,0.5,0.6] lets light through the annulus 0.1<0.2 and 0.5<0.6 making a beating double bessel beam…
  • n0 (float) – the refractive index of the medium
  • n_integration_steps (int) – number of integration steps to perform
Returns:

ex – the complex field

Return type:

ndarray

Example

>>> # the input pattern of a bessel beam that will focus after 4 microns
>>> ex = focus_field_beam_plane((256,256), (0.1,0.1), z = 4, lam=.5, NA = (.4,.5))

See also

biobeam.focus_field_beam()
the 3d function

5.2. Cylindrical light sheet

_images/pupil_cylinder.png
biobeam.focus_field_cylindrical_plane(shape=(128, 128), units=(0.1, 0.1), z=0.0, lam=0.5, NA=0.3, n0=1.0, ex_g=None, n_integration_steps=200)

calculates the complex 2d input field at position -z of a for a perfect, aberration free cylindrical lens after x polarized illumination via the vectorial debye diffraction integral.

Parameters:
  • shape (Nx,Ny) – the 2d shape of the geometry
  • units (dx,dy) – the pixel sizes in microns
  • z (float) – defocus position in microns, such that the beam would focus at z e.g. an input field with z = 10. would hav its focus spot after 10 microns
  • lam (float) – the wavelength of light used in microns
  • NA (float) – the numerical aperture of the lens
  • n0 (float) – the refractive index of the medium
  • n_integration_steps (int) – number of integration steps to perform
Returns:

ex – the complex field

Return type:

ndarray

Example

>>> # the input pattern of a bessel beam that will focus after 4 microns
>>> ex = focus_field_cylindrical_plane((256,256), (0.1,0.1), z = 4., lam=.5, NA = .4)

See also

biobeam.focus_field_cylindrical()
the 3d function

5.3. Bessel Lattices

_images/pupil_lattice.png
biobeam.focus_field_lattice_plane(shape=(256, 256), units=(0.1, 0.1), z=0.0, lam=0.5, NA1=0.4, NA2=0.5, sigma=0.1, kpoints=6, n0=1.0, apodization_bound=10, ex_g=None, n_integration_steps=100)

calculates the complex 2d input field at position -z of a for a bessel lattice beam.

Parameters:
  • shape (Nx,Ny) – the shape of the geometry
  • units (dx,dy) – the pixel sizes in microns
  • z (float) – defocus position in microns, such that the beam would focus at z e.g. an input field with z = 10. would have its focal spot after 10 microns
  • lam (float) – the wavelength of light used in microns
  • NA1 (float/list) – the numerical aperture of the inner ring
  • NA2 (float/list) – the numerical aperture of the outer ring
  • sigma (float) – the standard deviation of the gaussian smear function applied to each point on the aperture (the bigger sigma, the tighter the sheet in y)
  • kpoints (int/ (2,N) array) – defines the set of points on the aperture that create the lattice, can be - a (2,N) ndarray, such that kpoints[:,i] are the coordinates of the ith point - a single int, defining points on a regular polygon (e.g. 4 for a square lattice, 6 for a hex lattice) k_i = \arcsin\frac{NA_1+NA_2}{2 n_0} \begin{pmatrix} \cos \phi_i \\ \sin \phi_i \end{pmatrix}\quad, \phi_i = \frac{\pi}{2}+\frac{2i}{N}
  • n0 (float) – the refractive index of the medium
  • apodization_bound (int) – width of the region where the input field is tapered to zero (with a hamming window) on the +/- x borders
  • n_integration_steps (int) – number of integration steps to perform
  • return_all_fields (boolean) – if True, returns u,ex,ey,ez where ex/ey/ez are the complex vector field components
Returns:

u – the 2d complex field

Return type:

ndarray

Example

>>> u = focus_field_lattice_plane((128,128), (0.1,0.1), z = 2., lam=.5, NA1 = .44, NA2 = .55, kpoints = 6)

See also

biobeam.focus_field_lattice()
the corresponding 3d function