materials.material_file#
Material File
This module contains a class for representing a material based on a material YAML file from the refractiveindex.info database.
Kramer Harrison, 2024
Classes
|
Represents a material based on a material YAML file from the refractiveindex.info database. |
- class MaterialFile(filename, propagation_model=None, *, bounds: Literal['raise', 'clamp'] = 'clamp')[source]#
Represents a material based on a material YAML file from the refractiveindex.info database.
Material refractive indices are based on various dispersion formulas or tabulated data. The material file contains the coefficients for the dispersion formulas and/or tabulated data.
See https://refractiveindex.info/database/doc/Dispersion%20formulas.pdf
- Parameters:
filename (str) – The path to the material file.
propagation_model (BasePropagationModel, optional) – The propagation model to use. Defaults to None, which creates a HomogeneousPropagation model.
bounds – Out-of-range policy for tabulated n/k.
"clamp"(default) preserves endpoint values;"raise"rejects queries outside each table. This option does not change analytic formula evaluation.
- Variables:
- Methods:
n (wavelength, temperature, pressure) – Calculates the refractive index of the material at a given wavelength, temperature and pressure.
k (wavelength) – Retrieves the extinction coefficient of the material at a given wavelength.
- 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:
- classmethod from_dict(data)[source]#
Creates a material from a dictionary representation.
- Parameters:
data (dict) – The dictionary representation of the material.
- Returns:
An instance of MaterialFile.
- 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.