SourceField

class nsb2.core.dtypes.SourceField[source]

Bases: object

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

Variables:
  • coords (astropy.coordinates.SkyCoord) – Source positions, shape (N,).

  • weights (astropy.units.Quantity) – Per-source brightness weights, shape (N, C_w). For radiance fields these carry the solid-angle-dependent scaling.

  • spectral_data (numpy.ndarray) – Coordinates into spectral_grid, shape (N, D). D is zero when all sources share a single spectrum.

  • spectral_grid (nsb2.core.spectral.SpectralGrid) – The grid the spectral coordinates refer to.

  • radiance_field (bool, optional) – True if the field is a radiance (per unit solid angle) that maps one-to-one onto instrument pixels, False for discrete sources. Default is False.

Attributes Summary

Methods Summary

resolve_spectra(bandpass)

Look up the full spectrum of every source in a passband.

Attributes Documentation

coords = <dataclasses._MISSING_TYPE object>
radiance_field = False
spectral_data = <dataclasses._MISSING_TYPE object>
spectral_grid = <dataclasses._MISSING_TYPE object>
weights = <dataclasses._MISSING_TYPE object>

Methods Documentation

resolve_spectra(bandpass)[source]

Look up the full spectrum of every source in a passband.

Parameters:

bandpass (nsb2.core.spectral.Bandpass) – Passband to restrict the spectra to.

Returns:

A new field carrying wavelength-resolved fluxes. This field is not modified.

Return type:

ResolvedField

__init__(coords, weights, spectral_data, spectral_grid, radiance_field=False)
classmethod __new__(*args, **kwargs)