materials.at_conditions#
Material at Conditions
This module contains the MaterialAtConditions class, which evaluates another material at a fixed temperature and pressure. It lets an optic be traced with its glasses at another temperature without passing the conditions through the ray trace.
Classes
|
A material evaluated at a fixed temperature and pressure. |
- class MaterialAtConditions(material: BaseMaterial, temperature: float, pressure: float = 1.0, propagation_model: BasePropagationModel | None = None)[source]#
A material evaluated at a fixed temperature and pressure.
Every refractive index and extinction coefficient query is forwarded to the wrapped material with this wrapper’s
temperatureandpressure. The wrapper’s conditions always apply: keyword arguments given tonorkare not forwarded.Only materials whose model depends on the conditions change with them.
MaterialFile(andMaterial) applies the Schott dn/dT model when its data includes thermal coefficients. Materials that ignore temperature and pressure, such asIdealMaterialandAbbeMaterial, return their normal index.- Parameters:
material – The material to evaluate.
temperature – The temperature in degrees Celsius. Must be above absolute zero (-273.15 °C).
pressure – The ambient pressure in atmospheres. Must not be negative. Defaults to 1.0.
propagation_model – The propagation model to use for this material. If None, a default HomogeneousPropagation model is created.
- Raises:
TypeError – If
materialis not a material.ValueError – If
temperatureis not above absolute zero, orpressureis negative.
- 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:
- 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:
- 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:
- k(wavelength: float | be.ndarray, **kwargs) float | be.ndarray#
Calculates the extinction coefficient at a given wavelength with caching.
- 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.
- spectral_range(property_name: str = 'n') tuple[float, float] | None[source]#
The wrapped material’s validity limits in micrometers, or None.