Examples

Main examples

beampy.examples code.

List of examples from the beampy.examples module.

beampy.examples.benchmark_kerr()

Kerr benchmark by looking at the critical power at which a beam become a soliton. Several test were done with this function and for now, it seems that the critical power find by the simulations is about 85% of the theorical value. Meaning a 15% error. Further tests are needed to understand the observed differences.

beampy.examples.free_propag(dist_x=0.1, length_x=1000, length_z=10000, no=1, lo=1)

Show the free propagation of a beam and compare Beampy results with the theorical values.

Parameters
  • dist_x (float) – Step over x (µm).

  • length_x (float) – Size of the compute window over x (µm).

  • length_z (float) – Size of the compute window over z (µm).

  • no (float) – Refractive index of the cladding

  • lo (float) – Wavelength of the beam in vaccum (µm).

beampy.examples.gaussian_beam(fwhm=10)

Display a Gaussian beam at the given fwhm.

Parameters

fwhm (float) – Full width at half maximum (for intensity not amplitude) (µm).

beampy.examples.guides_x()

Display a Gaussian guide, two super-Gaussian guides and a flat-top guide to illustrate the width definition.

beampy.examples.guides_z()

Display an array of guides and the curved guides system.

beampy.examples.multimodal_splitter()

Multimodal splitter 1x2. A single mode beam is split into two single mode waveguide by the use of an intermediate multimodal waveguide.

beampy.examples.show_grid()

Show the computation grid and the displayed grid

beampy.examples.stability()

Show the possible BPM approximations for implementing a refractive index variation

beampy.examples.test_kerr()

More test than example. Show different approximations for the BPM implementation of the Kerr effect.

Gaussian beam width definition

Gaussian beam width definition

Waveguide profil definition

Waveguide profil definition

Waveguides list

Array of waveguides array, curved waveguides and arbitrary waveguides

Free propagation

Free propagation

Multimodal beam splitter 1x2

Multimodal beam splitter 1x2

Kerr soliton

Benchmark attempt on the critical power needed to create a soliton in a Kerr medium. The found power is 15% smaller than the theorical value

Grid definition

Grid definition

Other examples & results

two waveguides power

Power in two waveguides

waveguide array power

Power over z in each waveguide of the array. The power distribution in a waveguide array follow the Bessel function.

Airy beam

Airy beam propagation