Emitters

The emitters are the physical light sources of the night sky. Each one is two objects:

  • a builder – Emitter and its subclasses – which holds astropy and numpy state and turns an Observation into arrays, in prepare(obs).

  • a runtime source – SpectralSource – which the builder hands to the scene in model(). It is a JAX pytree, it is traced and differentiated, and it owns every Parameter the optimizer can reach.

Emitter

Path

Scales?

Model

Airglow

diffuse

no

ESO SkyCalc, with an SFU curve

ZodiacalLight

diffuse

yes

Leinert et al. (1998)

Moon

point

yes

ROLO, after Jones et al. (2013)

Stars

both

yes

Gaia DR3 + Pickles (1998)

BrightStars

point

yes

XHIP or Gaia, points only

PointSource

point

yes

one source, one spectrum

“Scales” is whether the emitter takes a brightness: a fittable amplitude on everything it emits, on both the diffuse and the point path. Airglow is the exception: its spectral model already evaluates 0.2 + 0.00614 * sfu(t) with a trainable sfu.

Writing your own emitter

Subclass Emitter, call super().__init__(geo, spectral_model, ...) and implement _prepare(obs). The base records the geometry signature that lets build() catch a component built against a different Geometry, validates brightness, and checks the frame count before every prepare.

_prepare returns a SourceObsData. Two flags on it choose the render path:

direct

Whether diffuse radiance is extincted along the line of sight.

inscatter

Whether point sources are in-scattered individually, giving each its own scattered halo.

The builder layer

nyx.emitter.base Module

Classes

Emitter

Shared base for EmitterLike implementations.

nyx.emitter.catalog Module

Classes

CatalogEmitter

A star catalog.

The runtime layer

nyx.emitter.sources Module

Classes

SpectralSource

Routes the diffuse and point paths through one spectral_model call.

Zodiacal Light

nyx.emitter.zodiacal Module

Classes

ZodiacalLight

Zodiacal light with the Leinert spatial model.

Airglow

nyx.emitter.airglow Module

Classes

Airglow

Airglow source with van Rhijn weighting.

Moon

nyx.emitter.moon Module

Functions

lit_fraction(alt_rad[, disc_radius_rad, ...])

Fraction of the scattering column above the observer still lit.

Classes

Moon

Moon emission model.

Stars

nyx.emitter.stars Module

Functions

gaia_star_field(geo[, lim_mag])

Split Gaia DR3 into all-sky point sources and the background they leave.

Classes

BrightStars

Pure point-source star catalog, with no diffuse map.

Stars

Star catalog emitter with resolved bright stars and a diffuse map.

Point Sources

nyx.emitter.point_source Module

Classes

PointSource

One point source at a fixed ICRS position.

Catalogs

nyx.emitter.catalogs.gaia Module

Functions

catalog_map(g, bp, rp, ra, dec, npix)

Bin catalog stars into a HEALPix linear-flux map.

color_grid(bp, rp)

Reddened Pickles (1998) spectra indexed by the Gaia RP - BP colour.

load_dr3()

Download (once) and load the Gaia DR3 catalog and faint-star map.

photometry(catalog)

(G, BP, RP) magnitudes, with missing BP/RP filled by median colour.

spectral_model(grid, geo[, horizon_mask])

Wrap a color_grid() as a JAX model over Gaia conditions.

nyx.emitter.catalogs.xhip Module

Functions

load_anderson2012()

Positions and photometry from the XHIP compilation (Anderson & Francis 2012).

spectral_model(v_minus_b, geo)

Pickles (1998) spectra indexed by the Johnson V-B colour.

nyx.emitter.catalogs.astrometry Module

Functions

altaz_array(coord)

AltAz pairs as a plain array.

altaz_track(coord, times, frames)

Where coord is, in each observation's AltAz frame.

angular_separation_deg(ra, dec, ra_arr, dec_arr)

Great-circle separation in degrees.

propagate_space_motion(coord, time)

Move coord to time along its proper motion, position only.

rotate_healpix(map_in, frame_in, frame_out)

Rotate a HEALPix map between any two astropy coordinate frames.

nyx.emitter.catalogs.index Module

Classes

HEALPixIndex

Cone search over ra/dec, indexed by nested-ordering HEALPix pixel.