materials.material#
Material
This module contains the Material class, which represents a generic material used in the Optiland system. This class identifies the correct material given the material name and (optionally) the reference, which is generally the manufacturer name or the author name. This is the primary material class used to define the optical properties of a material (or glass) in Optiland.
Kramer Harrison, 2024
Classes
|
Represents a generic material used in the Optiland system. |
- class Material(name: str, reference: str | None = None, robust_search: bool | None = None, min_wavelength: float | None = None, max_wavelength: float | None = None, propagation_model=None, *, catalog: str | None = None, match_policy: MatchPolicy = MatchPolicy.WARN, bounds: BoundsPolicy = 'clamp')[source]#
Represents a generic material used in the Optiland system. This class identifies the correct material given the material name and (optionally) the reference, which is generally the manufacturer name or the author name.
Note
The material database is stored in the file catalog_nk.csv in the database directory. This contains the names, references, and filenames of the materials.
- Parameters:
name (str) – The name of the material to search for.
reference (str, optional) – The reference for the material, typically the manufacturer or author name. This helps disambiguate materials with similar names. Defaults to None.
robust_search (bool | None, optional) – Deprecated. Use
match_policyinstead.Truemaps toMatchPolicy.BEST;Falsemaps toMatchPolicy.STRICT. Passing this argument emits aDeprecationWarning. Defaults to None.min_wavelength (float, optional) – Minimum wavelength in microns for filtering materials based on their valid range. Defaults to None.
max_wavelength (float, optional) – Maximum wavelength in microns for filtering materials based on their valid range. Defaults to None.
catalog (str, optional) – Manufacturer catalog to restrict lookup to (e.g.
"schott","ohara"). Keyword-only. Defaults to None.match_policy (MatchPolicy, optional) – Controls fuzzy-match behavior.
"warn"(default) emitsOptilandMaterialWarningon fuzzy match;"best"silently takes the best match;"strict"raisesValueErroron any non-exact match. Keyword-only.bounds – Tabulated n/k bounds policy passed to
MaterialFile. Defaults to"clamp";"raise"rejects out-of-range queries.
- Variables:
- 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:
- 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:
- property bounds: Literal['raise', 'clamp']#
The read-only out-of-range policy for tabulated n and k.
- 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:
- k(wavelength: float | be.ndarray, **kwargs) float | be.ndarray#
Calculates the extinction coefficient at a given wavelength with caching.
- n(wavelength: float | be.ndarray, **kwargs) float | be.ndarray#
Calculates the refractive index at a given wavelength with caching.