materials.data#
Optical materials built from owned data, with self-contained native persistence.
Classes
|
Own sampled or analytic dispersion and optional measured extinction. |
- class DataMaterial(definition: dict[str, Any], *, name: str = '', metadata: dict[str, Any] | None = None, propagation_model: BasePropagationModel | None = None, bounds: BoundsPolicy = 'raise')[source]#
Own sampled or analytic dispersion and optional measured extinction.
Use
from_samplesorfrom_coefficientsto construct optical data, or pass an explicit native definition. No file or registry is accessed. Definition records are immutable; create a replacement to change optical data. Wavelengths use micrometers and extinction k is dimensionless.- Parameters:
definition – Native dispersion and optional extinction objects.
name – Descriptive label, never a catalog-lookup instruction.
metadata – JSON-compatible descriptive provenance, copied on input/output.
propagation_model – Optional registered propagation model.
bounds – Tabulated n/k queries outside their respective sample intervals raise by default.
"clamp"holds the nearest endpoint value. Analytic formula validity limits remain enforced independently.
- 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.
- property definition: MaterialDefinition#
The read-only optical definition, independent of descriptive metadata.
- classmethod from_coefficients(formula: str, coefficients: Any, *, name: str = '', wavelength_range: Any = None, extinction: dict[str, Any] | None = None, metadata: dict[str, Any] | None = None, propagation_model: BasePropagationModel | None = None, bounds: BoundsPolicy = 'raise') DataMaterial[source]#
Preserve an analytic equation;
boundscontrols tabulated k only.A supplied formula wavelength range (in µm) is always enforced.
- classmethod from_dict(data: dict[str, Any]) DataMaterial[source]#
Restore owned optical data; BaseMaterial restores propagation dispatch.
- classmethod from_samples(wavelengths: Any, indices: Any, *, name: str = '', extinction: dict[str, Any] | None = None, metadata: dict[str, Any] | None = None, propagation_model: BasePropagationModel | None = None, bounds: BoundsPolicy = 'raise') DataMaterial[source]#
Interpolate n/k samples; optionally clamp outside each table’s interval.
- 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.