Exceptions¶
Every error raised by the package derives from
RadtraxError.
exceptions
¶
Exception hierarchy for radtrax.
Every error raised by this package derives from
RadtraxError, so a caller can trap the whole
package with a single except clause. Concrete errors also inherit from the
closest standard-library exception, so code written against the standard
library keeps working: a ShapeError is still caught by
except ValueError.
The classes name what went wrong, not the module that raised it. Checks that
run under jit (eqx.error_if) cannot carry a radtrax class: they raise
a RuntimeError at run time, equinox.EquinoxRuntimeError under
eqx.filter_jit and jax.errors.JaxRuntimeError under jax.jit.
RadtraxError
¶
ShapeError
¶
Bases: RadtraxError, ValueError
An array has the wrong shape or rank, or two arrays disagree in shape.
Examples:
GridError
¶
Bases: RadtraxError, ValueError
A grid is not strictly monotone, has too few points, or does not match another grid.
Also raised for a value that falls outside a table's grid.
Examples:
ParameterError
¶
Bases: RadtraxError, ValueError
A scalar or option is outside its allowed range or set, or a required one is missing.
Examples:
DegenerateInputError
¶
Bases: RadtraxError, ValueError
Well-shaped input that cannot be used: too few samples, no data yet, or a zero norm.
Examples:
ArgumentTypeError
¶
MissingKeyError
¶
Bases: RadtraxError, KeyError
A gas, band or variable is missing from a state, table or dataset.
Examples:
MissingExtraError
¶
Bases: RadtraxError, ImportError
An optional dependency is not installed; the message names the extra.
Examples:
MissingFileError
¶
MissingTableError
¶
Bases: MissingFileError
A table (cross sections, a solar spectrum) is not in the cache; its message names the command that builds or fetches it.
Examples:
TableBuildError
¶
Bases: RadtraxError, RuntimeError
Building a cross-section table failed: a HITRAN fetch or a line-by-line computation.
Examples: