Solver

class nsb2.core.solver.Solver[source]

Bases: object

Base class for rate computation strategies.

Subclasses implement compute_rates; see DirectSolver and ScatteredSolver for the two signatures in use.

Methods Summary

compile(source, instrument, atmosphere, **kwargs)

Pre-compute whatever this solver needs before predicting.

Methods Documentation

compile(source, instrument, atmosphere, **kwargs)[source]

Pre-compute whatever this solver needs before predicting.

The default implementation does nothing, which is correct for solvers that integrate explicitly at predict time.

Parameters:
Returns:

Compilation cost metric; zero when nothing was compiled.

Return type:

float

__init__()
classmethod __new__(*args, **kwargs)