PyPO User Manual
BindBeam.py File Reference

Bindings for the ctypes interface for PyPO. More...

Functions

def PyPO.BindBeam.loadBeamlib ()
 Load the PyPObeam shared library. More...
 
def PyPO.BindBeam.makeRTframe (RTDict_py)
 Generate a tubular ray-trace frame. More...
 
def PyPO.BindBeam.makeGRTframe (grdict_py)
 Generate a Gaussian ray-trace frame. More...
 
def PyPO.BindBeam.makeGauss (gdict_py, source)
 Generate a polarised Gaussian beam. More...
 
def PyPO.BindBeam.makeScalarGauss (gdict_py, source)
 Generate a scalar Gaussian beam. More...
 
def PyPO.BindBeam.calcCurrents (fields, source, mode)
 Calculate electromagnetic currents from electromagnetic field. More...
 

Detailed Description

Bindings for the ctypes interface for PyPO.

These bindings are concerned with beam generation for the ray-tracer and the physical optics.

Function Documentation

◆ calcCurrents()

def PyPO.BindBeam.calcCurrents (   fields,
  source,
  mode 
)

Calculate electromagnetic currents from electromagnetic field.

Parameters
fieldsFields object containing electromagnetic fields.
sourceA reflDict dictionary describing the plane on which the Gaussian is defined.
modeWhether to assume plane is perfect electrical conductor ('PEC'), magnetic conductor ('PMC') or no assumptions ('full').
Returns
out_current Currents object containing the currents calculated on source.
See also
fields
currents

◆ loadBeamlib()

def PyPO.BindBeam.loadBeamlib ( )

Load the PyPObeam shared library.

Will detect the operating system and link the library accordingly.

Returns
lib The ctypes library containing the C/C++ functions.

◆ makeGauss()

def PyPO.BindBeam.makeGauss (   gdict_py,
  source 
)

Generate a polarised Gaussian beam.

The beam is always defined parallel to the x, y plane. The z-coordinate can be adjusted. In order to tilt the beam, you have to tilt the underlying plane AFTER defining the beam on it.

Parameters
gdict_pyA GPODict dictionary containing relevant Gaussian beam parameters.
sourceA reflDict dictionary describing the plane on which the Gaussian is defined.
Returns
out_field Field object containing the electromagnetic fields associated with the Gaussian.
out_current Current object containing the electromagnetic currents associated with the Gaussian.
See also
GPODict
reflDict
fields
currents

◆ makeGRTframe()

def PyPO.BindBeam.makeGRTframe (   grdict_py)

Generate a Gaussian ray-trace frame.

The Gaussian ray-trace frame has positions and directions chosen from a Gaussian distribution..

Parameters
grdict_pyA filled GRTDict.
Returns
out A frame object containing the ray-trace frame.
See also
GRTDict
frame

◆ makeRTframe()

def PyPO.BindBeam.makeRTframe (   RTDict_py)

Generate a tubular ray-trace frame.

The tube consists of annular rings of rays and can be given opening angles and radii.

Parameters
RTDict_pyA filled TubeRTDict.
Returns
out A frame object containing the ray-trace frame.
See also
TubeRTDict
frame

◆ makeScalarGauss()

def PyPO.BindBeam.makeScalarGauss (   gdict_py,
  source 
)

Generate a scalar Gaussian beam.

The beam is always defined parallel to the x, y plane. The z-coordinate can be adjusted. In order to tilt the beam, you have to tilt the underlying plane AFTER defining the beam on it.

Parameters
gdict_pyA GPODict dictionary containing relevant scalar Gaussian beam parameters.
sourceA reflDict dictionary describing the plane on which the scalar Gaussian is defined.
Returns
out_field Scalarfield object containing the electric scalar field associated with the Gaussian.
See also
GPODict
reflDict
fields