materials.offset#

Offset Material

This module contains the OffsetMaterial class, which shifts the refractive index and the Abbe number of another material while keeping the shape of its dispersion curve. It models melt-to-melt deviations of a glass, as used by index and Abbe-number tolerances.

Kramer Harrison, 2026

Classes

OffsetMaterial(material[, delta_nd, ...])

A material with an offset refractive index and Abbe number.

class OffsetMaterial(material: BaseMaterial, delta_nd: float | be.ndarray = 0.0, delta_vd: float | be.ndarray = 0.0, propagation_model: BasePropagationModel | None = None)[source]#

A material with an offset refractive index and Abbe number.

With n_d, n_F and n_C the indices of the wrapped material at the Fraunhofer d, F and C lines and ν_d = (n_d - 1) / (n_F - n_C), the index is

n'(λ) = n_d + Δn + s (n(λ) - n_d), with s = (n_d + Δn - 1) / ((ν_d + Δν) (n_F - n_C)).

The d-line index becomes exactly n_d + Δn and the Abbe number exactly ν_d + Δν. The dispersion curve is scaled about the d line, so relative partial dispersions such as P_g,F are unchanged. The extinction coefficient is passed through unchanged, and keyword arguments given to n or k (such as temperature) are forwarded to the wrapped material. With both offsets zero, the wrapped material’s values are returned unchanged.

For a non-dispersive material (n_F == n_C), such as an IdealMaterial, only an index offset is defined; it is added at every wavelength.

Parameters:
  • material – The material to offset. It is not modified.

  • delta_nd – The offset of the d-line refractive index. Defaults to 0.0.

  • delta_vd – The offset of the Abbe number. Defaults to 0.0.

  • propagation_model – The propagation model to use for this material. If None, a default HomogeneousPropagation model is created.

Raises:
  • TypeError – If material is not a material.

  • ValueError – If delta_vd is nonzero and the material is not dispersive.

P_ref(wavelength: float)#

Calculate the relative partial dispersion at a reference wavelength.

The relative partial dispersion is defined as P_ref = (n_ref - n_D) / (n_F - n_C), where n_ref, n_D, n_F and n_C are the refractive indices at the reference wavelength, the D (587.5618 nm), F (486.1327 nm) and C (656.2725 nm) spectral lines, respectively.

Parameters:

wavelength (float) – The reference wavelength in microns.

PgF()#

Calculate the partial dispersion between the F and C lines.

The partial dispersion is defined as PgF = (n_g - n_F) / (n_F - n_C), where n_g, n_F, and n_C are the refractive indices at g (435.8343 nm), F (486.1327 nm), and C (656.2725 nm) spectral lines, respectively.

Returns:

The partial dispersion between the g and F lines.

Return type:

float

abbe() → float#

Calculate the Abbe number (Vd) of the material.

The Abbe number is a measure of the material’s dispersion, defined as Vd = (n_d - 1) / (n_F - n_C), where n_d, n_F, and n_C are the refractive indices at the Fraunhofer d (587.5618 nm), F (486.1327 nm), and C (656.2725 nm) spectral lines, respectively.

Returns:

The Abbe number of the material.

Return type:

float

dPgF()#

Calculate the deviation of the relative partial dispersion.

The deviation of the relative partial dispersion is defined as

dPgF = PgF - (0.6438 - 0.001682 Vd)

Returns:

The deviation of the relative partial dispersion.

Return type:

float

property delta_nd: float | be.ndarray#

The offset of the d-line refractive index.

property delta_vd: float | be.ndarray#

The offset of the Abbe number.

property display_name: str#

The wrapped material’s name with the offsets.

classmethod from_dict(data)[source]#

Creates a material from a dictionary representation.

Parameters:

data (dict) – The dictionary representation of the material.

Returns:

The material.

Return type:

OffsetMaterial

k(wavelength: float | be.ndarray, **kwargs) → float | be.ndarray#

Calculates the extinction coefficient at a given wavelength with caching.

Parameters:
  • wavelength (float | be.ndarray) – The wavelength(s) of light in microns. Can be a float, numpy array, or torch tensor.

  • **kwargs – Additional keyword arguments for calculation.

Returns:

The extinction coefficient at the given wavelength(s).

Return type:

float | be.ndarray

property material: BaseMaterial#

The wrapped material.

n(wavelength: float | be.ndarray, **kwargs) → float | be.ndarray#

Calculates the refractive index at a given wavelength with caching.

Parameters:
  • wavelength (float | be.ndarray) – The wavelength(s) of light in microns. Can be a float, numpy array, or torch tensor.

  • **kwargs – Additional keyword arguments for calculation (e.g., temperature).

Returns:

The refractive index at the given wavelength(s).

Return type:

float | be.ndarray

spectral_range(property_name: str = 'n') → tuple[float, float] | None[source]#

The wrapped material’s validity limits in micrometers, or None.

property thermal_expansion: float | None#

The wrapped material’s coefficient of thermal expansion, in 1/K.

to_dict()[source]#

Returns a dictionary representation of the material.

The wrapped material is stored with its own serialization.

Returns:

A dictionary representation of the material.

Return type:

dict