rayoptics.oprops.doe module

Module for diffractive/holographic optical elements

Classes that implement diffractive optics capabilities must implement the function phase() for use by the ray trace engine.

The DiffractiveElement and HolographicElement implementations are patterned after Wang, et al, Ray tracing and wave aberration calculation for diffractive optical elements

radial_phase_fct(pt, coefficients)[source]

Evaluate the phase and slopes at pt

Parameters:
  • pt – 3d point of incidence in Interface coordinates
  • coefficients – list of even power radial phase coefficients, e.g. r**2, r**4, …
Returns:

(dW, dWdX, dWdY)

  • dW: phase added by diffractive interaction
  • dWdX: slope in x direction
  • dWdY: slope in y direction

class DiffractiveElement(label='', coefficients=None, ref_wl=550.0, order=1, phase_fct=None)[source]

Bases: object

Container class for a phase fct driven diffractive optical element

phase_fct

fct the takes an input pt and returns phase and slope

coefficients

list of coeficients for phase function

ref_wl

wavelength in nm for phase measurement

order

which diffracted order to calculate the phase for

label

optical labeling for listing

listobj_str()[source]
phase(pt, in_dir, srf_nrml, z_dir, wl, n_in, n_out)[source]

Returns a diffracted ray and phase increment.

Parameters:
  • pt – point of incidence in Interface coordinates
  • in_dir – incoming direction cosine of incident ray
  • srf_nrmlInterface surface normal at pt
  • z_dir – -1 if after an odd # of reflections, +1 otherwise
  • wl – wavelength in nm for ray, defaults to ref_wl
  • n_in – refractive index preceding the interface
  • n_out – refractive index following the interface
Returns:

(out_dir, dW)

  • out_dir: direction cosine of the out going ray
  • dW: phase added by diffractive interaction

class HolographicElement(label='')[source]

Bases: object

Two point hologram element.

listobj_str()[source]
phase(pt, in_dir, srf_nrml, z_dir, wl, n_in, n_out)[source]