prysm.thinfilm#
Tools for performing thin film calculations.
- prysm.thinfilm.brewsters_angle(n0, n1, deg=True)#
Compute the Brewster’s angle at a given interface.
- prysm.thinfilm.critical_angle(n0, n1, deg=True)#
Minimum angle for total internal reflection at an interface.
- prysm.thinfilm.snell_aor(n0, n1, theta, deg=True)#
Compute the angle of refraction using Snell’s law.
- Parameters:
- Returns:
angle of refraction
- Return type:
- prysm.thinfilm.fresnel_rs(n0, n1, theta0, theta1)#
Compute the “r sub s” fresnel coefficient.
This is associated with reflection of the s-polarized electric field.
- prysm.thinfilm.fresnel_ts(n0, n1, theta0, theta1)#
Compute the “t sub s” fresnel coefficient.
This is associated with transmission of the s-polarized electric field.
- prysm.thinfilm.fresnel_rp(n0, n1, theta0, theta1)#
Compute the “r sub p” fresnel coefficient.
This is associated with reflection of the p-polarized electric field.
- prysm.thinfilm.fresnel_tp(n0, n1, theta0, theta1)#
Compute the “t sub p” fresnel coefficient.
This is associated with transmission of the p-polarized electric field.
- prysm.thinfilm.characteristic_matrix_p(lambda_, d, n, theta)#
Compute the characteristic matrix M_j^p for a layer of a material stack and p-polarized light.
Uses (4.49) to compute (4.55) from BYU optics book, edition 2015
- prysm.thinfilm.characteristic_matrix_s(lambda_, d, n, theta)#
Compute the characteristic matrix M_j^p for a layer of a material stack and s-polarized light.
Uses (4.49) to compute (4.55) from BYU optics book, edition 2015
- prysm.thinfilm.multilayer_matrix_p(n0, theta0, characteristic_matrices, nnp1, theta_np1)#
Reduce a multilayer problem to give the 2x2 matrix A^p.
Computes (4.58) from BYU optics book.
- Parameters:
n0 (float or complex) – refractive index of the first medium
theta0 (float) – angle of incidence on the first medium, radians
characteristic_matrices (iterable of ndarray each of which of shape 2x2) – the characteristic matrices of each layer
nnp1 (float or complex) – refractive index of the final medium
theta_np1 (float) – angle of incidence on final medium, radians
- Returns:
2x2 matrix A^s
- Return type:
ndarray
- prysm.thinfilm.multilayer_matrix_s(n0, theta0, characteristic_matrices, nnp1, theta_np1)#
Reduce a multilayer problem to give the 2x2 matrix A^s.
Computes (4.62) from BYU optics book.
- Parameters:
n0 (float or complex) – refractive index of the first medium
theta0 (float) – angle of incidence on the first medium, radians
characteristic_matrices (iterable of ndarray each of which of shape 2x2) – the characteristic matrices of each layer
nnp1 (float or complex) – refractive index of the final medium
theta_np1 (float) – angle of incidence on final medium, radians
- Returns:
2x2 matrix A^s
- Return type:
ndarray
- prysm.thinfilm.rtot(Amat)#
Compute rtot, the equivalent total fresnel coefficient for a multilayer stack.
- prysm.thinfilm.ttot(Amat)#
Compute ttot, the equivalent total fresnel coefficient for a multilayer stack.
- prysm.thinfilm.multilayer_stack_rt(indices, thicknesses, wavelength, polarization, substrate_index, aoi=0, ambient_index=1)#
Compute r and t for a given stack of materials.
- Parameters:
indices (ndarray) – refractive index for each film layer. The first axis is the layer axis; any trailing axes are vectorized calculation dimensions.
thicknesses (ndarray) – thickness of each film layer, microns. Must be broadcastable to the same shape as indices.
wavelength (float) – wavelength of light, microns
polarization (str, {'p', 's'}) – the polarization state
substrate_index (float or ndarray) – refractive index of the medium after the final film layer. May be a scalar, or broadcastable to the trailing dimensions of indices and thicknesses.
aoi (float, optional) – angle of incidence, degrees
ambient_index (float, optional) – The refractive index the film is immersed in, defaults to 1 (vacuum)
- Returns:
r, t coefficients
- Return type: