Skip to main content

GitHub Actions Workflow Status GitHub top language GitHub License PyPI - Version

Logo

pyetalon

PyEtalon is a Python library to analyse the multilayer interference of thin films in the context of etalons.

It provides an easy interface to calculate the phase shift of a known multilayer stack. Also, it allows fitting of the multilayer stack parameters to measured peak data of an etalon.

PyEtalon makes heavy use of PyIndexRepo, a python library to access the refractive index data from RefractiveIndex.info. See the documentation of PyIndexRepo for more information on how to access the refractive index data.

User guide

Background

The free spectral range (FSR) of an etalon is the distance between two adjacent transmission peaks. For an ideal etalon, it is given by the following equation:

$FSR_{\nu}= \Delta \nu = \frac{c}{2nL\cdot \cos(\theta)}$

where $c$ is the speed of light in vacuum, $n$ is the refractive index of the medium between the plates, $\theta$ is the angle of incidence, and $L$ is the distance between the plates.

In wavelength, the FSR is given by:

$FSR_{\lambda} = \Delta \lambda = \frac{\lambda^2}{2nL \cos(\theta)}$

where $\lambda$ is the wavelength of light in vacuum.

Similarly, the absolute peak wavelength of the etalon is given by:

$\lambda = \frac{2nL \cos(\theta)}{m}$

where $m$ is the order of the interference peak.

All equations above are only valid for an ideal etalon. In reality, upon reflection on the etalon mirrors, the light undergoes a phase shift. This phase shift is given by the Fresnel equations and depends on the refractive index of the materials involved. As a consequence, both, the FSR and the absolute peak wavelength are modified by the phase shift. It is most intuitive to think of the phase shift as a change in the effective optical path length or mirror separation $L$.

The peak wavelength is then given by:

$\lambda = \frac{2nL \cos(\theta)+ \lambda \frac{\Phi_{\lambda}}{\pi}}{m}$

Example

Let's walk through the simulation of a simple etalon with a single layer of 30nm of silver on a glass substrate. The etalon is illuminated with a plane wave at normal incidence.

The wavelength dependent refractive indices of the three materials are represented by a Material object, which can be created from a tabulated data set or a formula or by querying the refractive index database.

To calculate optical properties of an etalon, create an Etalon object and use the provided helper functions.

import numpy as np

from PyEtalon.etalon import Etalon
from PyEtalon.plotting import plot_fsr
from pyindexrepo import RefractiveIndexLibrary, Material, TabulatedIndexData, FormulaIndexData
from pyindexrepo.dispersion_formulas import formula_2


# Create vacuum 'material' by using a tabulated data set
Vacuum = Material(TabulatedIndexData([.1, 10.000], [1.0, 1.0]))
# Create the substrate material by using the Sellmeier formula and vendor data for Suprasil
Suprasil = Material(FormulaIndexData(formula_2, [0., 6.72472034E-01, 4.50684530E-03, 4.31646851E-01, 1.33090179E-02, 8.85914296E-01, 9.67375952E+01], .185, 2.326), None)
# Create the silver material by querying the refractive index database, selecting the Ciesielski data set for thin films
db = RefractiveIndexLibrary()
Silver = db.get_material('main', 'Ag', 'Ciesielski')


# Create an etalon object
silver_etalon = Etalon(
    [Vacuum, Silver, Suprasil],                     # specify the layer materials
    ["Vacuum", "Silver", "Substrate"],              # specify the layer names
    [-np.inf, 30., np.inf],                         # specify the layer thicknesses
    [0, 1, 2],                                      # specify the layer order/indices
    wavelength=np.linspace(500, 1100, 5000),        # specify the wavelength range
    d_spacer=5E-3,                                  # specify the spacer thickness in meters
    aoi=.0,                                         # specify the angle of incidence in degrees
    identifier='Silver 30nm'                        # specify the identifier of the etalon
)

Metadata

Release files for pyetalon 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyetalon 0.1.3
File Size Uploaded
pyetalon-0.1.3.tar.gz 15.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyetalon 0.1.3
File Interpreter ABI Platform
pyetalon-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 30.5 kB

Release files / pyetalon-0.1.3.tar.gz

Download URL pyetalon-0.1.3.tar.gz
Size 15.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b6d75207a071320e0389b87f9e1cc174e47d37542096c16750d7addc9de4bb03
BLAKE2b-256 checksum
How to use checksums
4d7a83309ff12da93af9417bb8f742115b3c288f6b0e420645f7ee67ac3ad2b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 16, 2026.

Transparency log

Release files / pyetalon-0.1.3-py3-none-any.whl

Download URL pyetalon-0.1.3-py3-none-any.whl
Size 14.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bd5dbbef53afc022823c9375e449ee878ff132f130b3937646501e21f6ceecc6
BLAKE2b-256 checksum
How to use checksums
8e519a8d3d95480d8d927820f19f223de220731233824e5d8fb9c446554b5ae5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 16, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page