Pipeline¶
- class nsb2.core.pipeline.Pipeline[source]¶
Bases:
objectOne instrument and atmosphere, traced over a set of sources and paths.
- Parameters:
instrument (nsb2.core.instrument.Instrument) – Instrument collecting the light.
atmosphere (nsb2.core.atmosphere.Atmosphere) – Atmosphere the light travels through.
sources (nsb2.core.sources.Source or list of nsb2.core.sources.Source) – Sources to trace. A single source is wrapped in a list.
paths (nsb2.core.lightpath.LightPath or list of nsb2.core.lightpath.LightPath) – Light paths to trace each source along. A single path is wrapped in a list.
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:
- 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:
- classmethod __new__(*args, **kwargs)¶