Materials

This module provides a series of classes representing various optical materials with several different dispersion formula, such as Cauchy formula, Schott formula and Sellmeier formula, etc.

All the material classes are derived from Material and share its constructor arguments. They have also a method n() to compute the refractive index for given wavelength. Each class implements this method by its own dispersion formula. The main reference for these dispersion types is Zemax.

This module maintains a material library to add, delete or retrieve materials. See Accessing materials.

Base class

class dnois.mt.Material(name: str, min_wl: float = None, max_wl: float = None, default_unit: str = 'um')

Class representing an optical material type.

Parameters:
  • name (str) – Name of the material.

  • min_wl (float) – Minimum applicable wavelength in default_unit. Default: 0.

  • max_wl (float) – Maximum applicable wavelength in default_unit. Default: infinity.

  • default_unit (str) – Unit of wavelength for dispersion formula and min_wl and max_wl. Default: 'um'.

abstract n(wavelength: Real | Tensor) Real | Tensor

Computes refractive index.

Parameters:

wavelength – Value of wavelength.

Type:

float or Tensor

Returns:

Refractive index.

Return type:

float or Tensor

Materials

Air(name[, min_wl, max_wl, default_unit])

Air in normal temperature and pressure, whose dispersion formula is:

Cauchy(name, a, b, c[, min_wl, max_wl, ...])

Material for which Cauchy formula:

Conrady(name, n0, a, b[, min_wl, max_wl, ...])

Materials described by Conrady formula:

Constant(name, n[, min_wl, max_wl, default_unit])

Material with constant optical properties.

Herzberger(name, coefficients[, min_wl, ...])

Materials described by Herzberger formula:

Schott(name, coefficients[, min_wl, max_wl, ...])

Materials described by Schott formula:

Sellmeier1(name, ks, ls[, min_wl, max_wl, ...])

Materials described by Sellmeier1 formula:

Sellmeier2(name, a, b1, b2, wl1, wl2[, ...])

Materials described by Sellmeier2 formula:

Sellmeier3(name, ks, ls[, min_wl, max_wl, ...])

Materials described by Sellmeier3 formula:

Sellmeier4(name, a, b, c, d, e[, min_wl, ...])

Materials described by Sellmeier4 formula:

Sellmeier5(name, ks, ls[, min_wl, max_wl, ...])

Materials described by Sellmeier5 formula:

Accessing materials

dispersion_types([name_only])

Returns a list of accessible subclasses of Material in lexicographic order.

get(name[, default_none])

Get material by name from material library.

is_available(name)

Check if given material is available in material library.

list_all()

List all available materials in material library.

register(material[, exist_ok])

Add a new class of material into material library.

registered(name)

Check if a material is registered in material library by name.

remove(name[, ignore_if_absent])

Remove a material from material library.

update(name, material)

Update a registered material.

Others

dnois.mt.refractive_index(wavelength: Real | Tensor, material: str) Real | Tensor

Compute refractive index for given wavelength and material.

Parameters:
  • wavelength – Specified wavelength.

  • material (str) – Specified material.

Type:

float or Tensor

Returns:

Refractive index.

Return type:

float or Tensor