optmat.solid.models.registry#

Every model of a solid’s dielectric function, and the recommended one.

Models come from the fits (optmat.solid.models.fitted), the published formulas of the source records (optmat.solid.models.formulas) and the stitched tables of curated optical constants (optmat.solid.models.tabulated). The recommended model of each material is chosen, with its reason, in data/solid/defaults.toml.

Functions

default_model(material[, axis])

Return the recommended model of a solid.

default_reason(material)

Return why the recommended model of a solid was chosen.

model(name)

Return a model by name.

models(material)

Return every model of a solid, by name.

optmat.solid.models.registry.default_model(material, axis=None)[source]#

Return the recommended model of a solid.

Parameters:
materialstr

The material’s id or an alias.

axisstr, optional

For an anisotropic crystal, the axis (o or e for a uniaxial one); required when the recommendation is per axis.

Returns:
Model

The model data/solid/defaults.toml names for it.

Raises:
OptmatError

If no model is recommended for the material (or the axis) yet, or an axis is needed and not given.

optmat.solid.models.registry.default_reason(material)[source]#

Return why the recommended model of a solid was chosen.

Parameters:
materialstr

The material’s id or an alias.

Returns:
str

The reason data/solid/defaults.toml gives.

Raises:
OptmatError

If no model is recommended for the material yet.

optmat.solid.models.registry.model(name)[source]#

Return a model by name.

Parameters:
namestr

<source>/<formula>.

Returns:
Model

The model.

Raises:
OptmatError

If no model has that name.

optmat.solid.models.registry.models(material)[source]#

Return every model of a solid, by name.

Parameters:
materialstr

The material’s id or an alias.

Returns:
dict of str to Model

The models, named <source>/<formula>.