pnps.exceptions#
The exception and warning hierarchies.
Every error raised by this package is a PnpsError and every warning it emits
is a PnpsWarning, so callers can catch or filter the whole family with one
clause and still tell the cases apart. Each error also derives from the built-in
exception it refines (ValueError for a bad argument, RuntimeError
for a failed run), so code written against the built-ins keeps working. Raise the
most specific subclass; never raise a bare Exception.
solprop’s own errors (solprop.exceptions.SolpropError) pass through
unchanged: they describe the engine, not the instrument.
Exceptions
A configuration this package cannot build or run: a bad or missing setting. |
|
A delay that is not a scalar, or that lies outside the protected headroom. |
|
A run on solprop that went wrong: a broken invariant or a missing part. |
|
A time or transverse grid that cannot be built from the given limits. |
|
The grids solprop builds no longer reproduce this package's grids. |
|
An instrument part (beam, mask hole, collection window) that is not valid. |
|
A material model asked for outside what it can evaluate. |
|
Base class of every error this package raises. |
|
Base class of every warning this package emits. |
|
An input pulse that cannot be built, prepared or measured. |
|
A pulse file whose datasets are missing or of the wrong kind. |
|
A saved plane that cannot be reduced to the observables as asked. |
|
A scan, shard selection or scan file that is not consistent. |
|
OpenMP thread binding had confined the process's main thread to one CPU. |
|
A feature this package does not provide (yet); the message says why. |
|
An exact collection window overlaps the far field of an input hole. |
- exception pnps.exceptions.ConfigError[source]#
Bases:
PnpsError,ValueErrorA configuration this package cannot build or run: a bad or missing setting.
- exception pnps.exceptions.DelayError[source]#
Bases:
PnpsError,TypeError,ValueErrorA delay that is not a scalar, or that lies outside the protected headroom.
- exception pnps.exceptions.EngineError[source]#
Bases:
PnpsError,RuntimeErrorA run on solprop that went wrong: a broken invariant or a missing part.
- exception pnps.exceptions.GridError[source]#
Bases:
PnpsError,ValueErrorA time or transverse grid that cannot be built from the given limits.
- exception pnps.exceptions.GridRuleError[source]#
Bases:
GridErrorThe grids solprop builds no longer reproduce this package’s grids.
- exception pnps.exceptions.InstrumentError[source]#
Bases:
PnpsError,ValueErrorAn instrument part (beam, mask hole, collection window) that is not valid.
- exception pnps.exceptions.MaterialError[source]#
Bases:
PnpsError,ValueErrorA material model asked for outside what it can evaluate.
- exception pnps.exceptions.PnpsError[source]#
Bases:
ExceptionBase class of every error this package raises.
- exception pnps.exceptions.PnpsWarning[source]#
Bases:
UserWarningBase class of every warning this package emits.
- exception pnps.exceptions.PulseError[source]#
Bases:
PnpsError,ValueErrorAn input pulse that cannot be built, prepared or measured.
- exception pnps.exceptions.PulseFileError[source]#
Bases:
PulseError,TypeErrorA pulse file whose datasets are missing or of the wrong kind.
- exception pnps.exceptions.ReductionError[source]#
Bases:
PnpsError,ValueErrorA saved plane that cannot be reduced to the observables as asked.
- exception pnps.exceptions.ScanError[source]#
Bases:
PnpsError,ValueErrorA scan, shard selection or scan file that is not consistent.
- exception pnps.exceptions.ThreadBindingWarning[source]#
Bases:
PnpsWarningOpenMP thread binding had confined the process’s main thread to one CPU.
With
OMP_PROC_BINDset, starting solprop’s native backend binds the main thread to its first place; numba’s pool and solprop’s march then run on that one CPU. This package restores the thread’s CPUs and emits this warning; leaveOMP_PROC_BINDandOMP_PLACESunset to avoid both (see the manual’s clusters page).
- exception pnps.exceptions.UnsupportedError[source]#
Bases:
PnpsError,NotImplementedErrorA feature this package does not provide (yet); the message says why.
- exception pnps.exceptions.WindowOverlapWarning[source]#
Bases:
PnpsWarningAn exact collection window overlaps the far field of an input hole.
With
Config.exact_windowsa window collects only the nonlinear part of the field, so the transmitted input light a detector behind that window would also see is left out of its spectra.