optmat.exceptions#

The package’s exception and warning hierarchy.

Every error the package raises derives from OptmatError, so a caller can catch the package’s refusals without catching unrelated ones.

Exceptions

ArgumentError

An argument is outside its domain: not finite, or of the wrong sign.

CatalogueIndexWarning

The catalogue's index disagrees with the source records, which are used instead.

DataError

A curated data file is malformed, inconsistent or refers to something missing.

ModelAbsorptionWarning

A real-part method is evaluated where the gas absorbs noticeably.

ModelRangeWarning

A model is evaluated outside the range over which its source supports it.

OptmatError

Base class of every error raised by optmat.

StateError

A thermodynamic state (pressure, temperature) is unphysical or out of domain.

UnavailableModelError

No curated model exists for what was asked: the data do not support one.

exception optmat.exceptions.ArgumentError[source]#

Bases: OptmatError, ValueError

An argument is outside its domain: not finite, or of the wrong sign.

exception optmat.exceptions.CatalogueIndexWarning[source]#

Bases: UserWarning

The catalogue’s index disagrees with the source records, which are used instead.

The index only speeds up searches; a stale one is regenerated with tools/catalogue_index.py in a source checkout.

exception optmat.exceptions.DataError[source]#

Bases: OptmatError, ValueError

A curated data file is malformed, inconsistent or refers to something missing.

exception optmat.exceptions.ModelAbsorptionWarning[source]#

Bases: UserWarning

A real-part method is evaluated where the gas absorbs noticeably.

The real polarizability or n - 1 alone then leaves out the absorption: use complex_polarizability() or refractive_index().

exception optmat.exceptions.ModelRangeWarning[source]#

Bases: UserWarning

A model is evaluated outside the range over which its source supports it.

exception optmat.exceptions.OptmatError[source]#

Bases: Exception

Base class of every error raised by optmat.

exception optmat.exceptions.StateError[source]#

Bases: OptmatError, ValueError

A thermodynamic state (pressure, temperature) is unphysical or out of domain.

exception optmat.exceptions.UnavailableModelError[source]#

Bases: OptmatError, LookupError

No curated model exists for what was asked: the data do not support one.