Core

The core subpackage contains the fundamental building blocks of nsb2: spectral grids, atmospheric models, emitter interfaces, instrument responses, and the simulation pipeline.

Everything documented below is also re-exported from nsb2.core itself, so from nsb2.core import Pipeline works as well as the full path.

Functions

integrate_wavelength(flux, wavelength[, axis])

Integrate a spectral quantity over wavelength.

Classes

Bandpass

Wavelength-dependent transmission of an optical passband.

RateGrid

Band-integrated rates tabulated on an N-dimensional parameter grid.

SpectralGrid

Spectra tabulated on an N-dimensional grid of source parameters.

Functions

haversine(delta_lon, lat1, lat2)

Angular distance between two points on a sphere.

Classes

Atmosphere

Base class for atmospheric models.

Classes

CompositePipeline

Several pipelines run together as one.

Pipeline

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

PipelineLike

Structural type shared by Pipeline and CompositePipeline.

Classes

EffectiveApertureInstrument

Instrument described by a per-pixel effective aperture map.

Instrument

Base class for telescope and camera models.

Classes

CatalogSource

Resolved point sources from a photometric catalogue.

EphemerisSource

A solar system body, whose position depends on the observation time.

HEALPixSource

Diffuse source stored as a HEALPix radiance map.

LonLatSource

Diffuse source defined by analytic functions of longitude and latitude.

RadianceSource

Base class for diffuse sources that map one-to-one onto pixels.

Source

Base class for sky brightness sources.

Functions

PicklesTRDSAtlas1998()

Load the Pickles stellar spectral atlas [Pickles1998].

SolarSpectrumRieke2008()

Load the solar reference spectrum of [Rieke2008].

create_color_grid(magnitude, color, ...[, ...])

Build a spectral grid indexed by observed photometric colour.

synthetic_magnitude(wvl, flx, bandpass)

Compute the synthetic Vega magnitude of a spectrum in a passband.

Functions

gte_to_sunrel(gte_coords, sunrel_frame)

Transform geocentric true ecliptic to Sun-relative ecliptic coordinates.

sunrel_to_gte(sunrel_coords, gte_frame)

Transform Sun-relative ecliptic to geocentric true ecliptic coordinates.

Classes

SunRelativeEclipticFrame

Ecliptic coordinates with longitude measured from the Sun.

Classes

DirectPath

Direct light: source, atmospheric extinction, then the pixel it lands in.

LightPath

Base class for physical light paths from a source to a pixel.

ScatteredPath

Scattered light: the whole visible sky, scattered into the field of view.

Classes

DirectSolver

Base class for solvers of the direct, extinction-only light path.

ExplicitDirectSolver

Direct extinction evaluated by full spectral integration.

ExplicitScatteredSolver

Scattered light evaluated by full spectral integration.

LUTDirectSolver

Direct extinction interpolated from a pre-compiled lookup table.

LUTScatteredSolver

Scattered light interpolated from a pre-compiled lookup table.

ScatteredSolver

Base class for solvers of the scattered, indirect light path.

Solver

Base class for rate computation strategies.

Classes

PixelRefs

Assignment of sources to instrument pixels.

Prediction

Predicted pixel rates from one source along one light path.

ResolvedField

Sources whose spectra have been resolved onto a wavelength grid.

SourceField

Sources on the sky together with a reference to their spectra.

Classes

UnitRegularGridInterpolator

Regular-grid interpolator that preserves units and dynamic range.