rayoptics.oprops.thinlens module

Module for thin lens interface type

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

Bases: Interface

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

max_ap is the max aperture radius

property optical_power
set_optical_power(pwr, n_before, n_after)[source]
apply_scale_factor(scale_factor)[source]
update_following_reflection()[source]

Notification that incident light is following reflection.

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, ifc_cntxt)[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

  • ifc_cntxt

    a tuple containing

    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 interact_mode: ‘transmit’ or ‘reflect’

Returns:

(out_dir, dW)

  • out_dir: direction cosine of the out going ray

  • dW: phase added by diffractive interaction