pyoptics.coatings

Thin film coatings on the surfaces of a ray traced system.

A Coating is a stack of Layer objects (material and thickness) on a surface of pyoptics.raytrace. The layers are listed in the order the light meets them: from the medium in front of the surface (in the sequence of the system) to the medium behind it, or for a mirror to its substrate. Every ray sees the stack as a plane stack in the tangent plane of the surface at its hit point (the layers are thin compared to the radii of curvature); its angle of incidence is taken against the local surface normal, and the layer thicknesses are measured along that normal. pyoptics.thin_films gives the amplitude coefficients.

Thickness variations

Coating thicknesses vary across a surface (e.g. thinner towards the rim of a strongly curved lens). A layer’s profile is the relative thickness t(x, y)/t_0 as a function of the local surface coordinates x, y (the vertex plane of the surface in its own, possibly decentred and tilted frame):

with rho, x_n, y_n normalized by r_norm. Any function f(x, y) works as a profile too.

Convention: exp(i(k.r - omega*t)) as in pyoptics.thin_films; absorbing media have n + i*k with k > 0. r and t are the ratios of the tangential electric field components (Zangwill), see Coating.amplitudes().

References

H. A. Macleod, “Thin-Film Optical Filters”, 3rd ed., Institute of Physics Publishing (2001).

  1. Zangwill, “Modern Electrodynamics”, Cambridge University Press (2013).

G. Yun, K. Crabtree and R. A. Chipman, “Three-dimensional polarization ray-tracing calculus I: definition and diattenuation”, Appl. Opt. 50, 2855-2865 (2011).

R. A. Chipman, W.-S. T. Lam and G. Young, “Polarized Light and Optical Systems”, CRC Press (2018).

Classes

Coating

Thin film stack on a surface.

Layer

A homogeneous thin film.

PolynomialProfile

Relative thickness 1 + sum c_ij (x/r_norm)**i (y/r_norm)**j.

RadialProfile

Relative thickness 1 + a_2 rho**2 + a_4 rho**4 + ..., rho = r/r_norm.

ZernikeProfile

Relative thickness 1 + sum c_j Z_j(x/r_norm, y/r_norm) with the Fringe Zernikes of pyoptics.bases (Z_1 = 1 is a uniform change).

class pyoptics.coatings.RadialProfile(coefficients, r_norm=1.0)[source]

Bases: object

Relative thickness 1 + a_2 rho**2 + a_4 rho**4 + …, rho = r/r_norm.

Parameters:
coefficientssequence

(a_2, a_4, …) of the even powers of rho.

r_normnumber, optional

Normalization radius (e.g. the semi diameter), in system units.

class pyoptics.coatings.PolynomialProfile(coefficients, r_norm=1.0)[source]

Bases: object

Relative thickness 1 + sum c_ij (x/r_norm)**i (y/r_norm)**j.

Parameters:
coefficientsdict

{(i, j): c_ij}, e.g. {(1, 0): 0.02} for a linear wedge along x.

r_normnumber, optional
class pyoptics.coatings.ZernikeProfile(coefficients, r_norm=1.0)[source]

Bases: object

Relative thickness 1 + sum c_j Z_j(x/r_norm, y/r_norm) with the Fringe Zernikes of pyoptics.bases (Z_1 = 1 is a uniform change).

Parameters:
coefficientsdict

{j: c_j}.

r_normnumber, optional
class pyoptics.coatings.Layer(material, thickness, profile=None, label=None)[source]

Bases: object

A homogeneous thin film.

Parameters:
materialnumber, callable, (n_d, V_d) or materials.Material

Refractive index n + i*k (k > 0 absorbing); anisotropic materials enter with their mean index.

thicknessnumber

Nominal (physical) thickness in system units.

profilecallable, optional

Relative thickness f(x, y) on the local surface coordinates, e.g. RadialProfile; None: uniform.

labelstr, optional
classmethod quarter_wave(material, wavelength, wavelength_nm=None, profile=None, label=None, angle=0.0, n_incident=1.0)[source]

Layer of optical thickness wavelength/4.

With an angle of incidence (in the medium n_incident in front of the stack), the layer is a quarter wave for the tilted wave, n t cos(theta_layer) = wavelength/4, as for a mirror designed for 45 degrees.

Parameters:
materialnumber, callable, (n_d, V_d) or materials.Material

See Layer.

wavelengthnumber

Design wavelength in system units.

wavelength_nmnumber, optional

Wavelength in nm at which the material is evaluated.

profilecallable, optional

Relative thickness profile, see Layer.

labelstr, optional
anglenumber, optional

Design angle of incidence in radians.

n_incidentnumber, optional

Refractive index in front of the stack.

Returns:
Layer
thickness_at(x=None, y=None)[source]

Thicknesses at local surface points.

Parameters:
x, yarrays, optional

Local surface coordinates. Without them (or without a profile), the nominal thickness is returned.

Returns:
tnumber or array
class pyoptics.coatings.Coating(layers=(), substrate=None, label=None)[source]

Bases: object

Thin film stack on a surface.

Parameters:
layerssequence of Layer or (material, thickness)

From the medium in front of the surface (in the order of the system) towards the medium behind it (or the substrate of a mirror).

substratenumber, callable, (n_d, V_d) or materials.Material, optional

Substrate of a reflecting surface (e.g. a metal, n + i*k). Ignored for refracting surfaces, whose substrate is the medium behind the surface.

labelstr, optional
reversed()[source]

The same stack seen from the other side.

amplitudes(cos_i, n1, n2, wavelength, wavelength_nm=None, x=None, y=None)[source]

Amplitude coefficients of the stack for the angles of incidence with the cosines cos_i (array) in the medium n1.

Parameters:
cos_iarray
n1, n2numbers

Indices in front of and behind the stack; n2=None: the substrate.

wavelengthnumber

Vacuum wavelength in the unit of the layer thicknesses.

wavelength_nmnumber, optional

Wavelength for the dispersion of the materials.

x, yarrays, optional

Local surface coordinates of the rays for the thickness profiles.

Returns:
r_s, r_p, t_s, t_parrays

Ratios of the tangential electric field components (the convention of thin_films.r_t_coeffs()).

power(angle, n1, n2=None, wavelength=None, wavelength_nm=None, x=None, y=None)[source]

Reflectance and transmittance of the stack.

Use it e.g. to check a design over the angle of incidence.

Parameters:
anglenumber or array

Angles of incidence in radians in the medium n1 (real).

n1number

Refractive index in front of the stack.

n2number, optional

Refractive index behind the stack; None: the substrate.

wavelengthnumber

Vacuum wavelength in the unit of the layer thicknesses.

wavelength_nmnumber, optional

Wavelength for the dispersion of the materials.

x, yarrays, optional

Local surface coordinates for the thickness profiles.

Returns:
dict

“R_s”, “R_p”, “T_s”, “T_p” and the absorptances “A_s”, “A_p”.