Pipeline

class nsb2.core.pipeline.Pipeline[source]

Bases: object

One instrument and atmosphere, traced over a set of sources and paths.

Parameters:

Examples

>>> pipeline = Pipeline(instrument, atmosphere, moon,
...                     [DirectPath(), ScatteredPath()])
>>> predictions = pipeline.predict(observation)

Methods Summary

compile(**kwargs)

Pre-compute the lookup tables of every source-path combination.

predict(observation)

Run the simulation for one observation.

Methods Documentation

compile(**kwargs)[source]

Pre-compute the lookup tables of every source-path combination.

Must be called before predict() when any path uses a lookup table solver. Paths that integrate explicitly ignore the call.

Parameters:

**kwargs – Solver-specific compilation options, forwarded to every path.

Returns:

Summed compilation cost metric.

Return type:

float

predict(observation)[source]

Run the simulation for one observation.

Parameters:

observation (astropy.coordinates.BaseCoordinateFrame) – The telescope pointing frame, carrying the observation time and location on its origin.

Returns:

One prediction per source and light path, each tagged with the names of the source and path that produced it.

Return type:

list of nsb2.core.dtypes.Prediction

__init__(instrument, atmosphere, sources, paths)[source]
classmethod __new__(*args, **kwargs)