pypret.material module

This module provides classes to calculate the refractive index based on Sellmeier equations.

This is required to correctly model d-scan measurements.

Currently only very few materials are implemented. But more should be easy to add. If the refractive index is described by formula 1 or 2 from refractiveindex.info you can simply instantiate SellmeierF1 or SellmeierF2. If not, inherit from BaseMaterial and implement the self._func method.

Available materials

pypret.material.BK7 = <pypret.material.SellmeierF2 object>

Material instance describing N-BK7 (SCHOTT).

The data was taken from refractiveindex.info

pypret.material.FS = <pypret.material.SellmeierF1 object>

Material instance describing fused silica (fused quartz).

The data was taken from refractiveindex.info

Base classes

class pypret.material.BaseMaterial(coefficients, freq_range, scaling=1000000.0, check_bounds=True, name='', long_name='')[source]

Abstract base class for dispersive materials.

__init__(coefficients, freq_range, scaling=1000000.0, check_bounds=True, name='', long_name='')[source]

Creates a dispersive material.

Parameters:
  • coefficients (ndarray) – The Sellmeier coefficients.
  • freq_range (iterable) – The wavelength range in which the Sellmeier equation is valid (given in m).
  • check_bounds (bool, optional) – Specifies if the frequency argument should be checked on every evaluation to match the allowed range.
  • scaling (float, optional) – Specifies the scaling of the Sellmeier formula. E.g., most Sellmeier formulas are defined in terms of µm (micrometer), whereas our function interface works in meter. In that case the scaling would be 1e6. Default is 1.0e6.
k(x, unit='wl')[source]

The wavenumber in the material in rad / m.

n(x, unit='wl')[source]

The refractive index at frequency x specified in units unit.

class pypret.material.SellmeierF1(coefficients, freq_range, scaling=1000000.0, check_bounds=True, name='', long_name='')[source]

Defines a dispersive material via a specific Sellmeier equation.

This subclass supports materials with a Sellmeier equation of the form:

n^2(l) - 1 = c1 + c2 * l^2 / (l2 - c3^2) + ...

This is formula 1 from refractiveindex.info [DispersionFormulas].

class pypret.material.SellmeierF2(coefficients, freq_range, scaling=1000000.0, check_bounds=True, name='', long_name='')[source]

Defines a dispersive material via a specific Sellmeier equation.

This subclass supports materials with a Sellmeier equation of the form:

n^2(l) - 1 = c1 + c2 * l^2 / (l2 - c3) + ...

This is formula 2 from refractiveindex.info [DispersionFormulas].