rayoptics.oprops.thinlens module

Module for thin lens interface type

class ThinLens(lbl='', power=0.0, ref_index=1.5, **kwargs)[source]

Bases: rayoptics.seq.interface.Interface

list_thinlens()[source]
update()[source]
full_profile(sd, flat_id=None, dir=1, steps=6)[source]
profile_cv
surface_od()[source]
set_max_aperture(max_ap)[source]

max_ap is the max aperture radius

optical_power
set_optical_power(pwr, n_before, n_after)[source]
apply_scale_factor(scale_factor)[source]
from_first_order(nu_before, nu_after, y)[source]
normal(p)[source]

Returns the unit normal of the interface at point p.

intersect(p0, d, **kwargs)[source]

Intersect an Interface, starting from an arbitrary point.

Parameters:
  • p0 – start point of the ray in the interface’s coordinate system
  • d – direction cosine of the ray in the interface’s coordinate system
  • z_dir – +1 if propagation positive direction, -1 if otherwise
  • eps – numeric tolerance for convergence of any iterative procedure
Returns:

distance to intersection point s1, intersection point p

Return type:

tuple

Raises:

TraceMissedSurfaceError

phase(pt, d_in, normal, z_dir, wl, n_in, n_out)[source]

Returns a diffracted ray direction and phase increment.

Parameters:
  • pt – point of incidence in Interface coordinates
  • in_dir – 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