Core

Scene

nyx.core.scene Module

Classes

Scene

Multi-instrument observation of a shared physical sky.

Render Pipeline

nyx.core.pipeline Module

Functions

contributions(scene)

Pixel rates of each source separately, summing to render().

render(scene)

Render a single-observation scene to pixel rates.

Classes

RenderFrame

One instrument's view of the scene.

nyx.core.protocols Module

Classes

AtmosphereModel

Extinction and scattering, shared across every instrument in a scene.

EmitterLike

Protocol for emitter builders, consumed by Scene.build().

InstrumentModel

Sensor that maps sky radiance to detector counts.

SkySource

Source model: the shared physics mapping conditions to photons.

nyx.core.records Module

Functions

unwrap(x)

The value inside a PerObs, or x unchanged if it is not one.

Classes

AtmosphereResult

Output of atmosphere evaluation, consumed by the render loop.

PerObs

Marks a value whose leading axis is the observation axis.

PointSourceData

Point source data for the render loop (single observation).

RenderGeometry

Sky geometry and pointing for one observation.

SkyGeometry

Hemisphere positions and FOV grid for one observation, in every frame.

SourceObsData

Per-instrument observation data for any sky source.

Parameters

nyx.core.parameter Module

Functions

is_parameter(x)

Whether x is a Parameter; the is_leaf predicate throughout.

Classes

Parameter

A trainable physical parameter with an explicit characteristic scale.

nyx.core.paramtree Module

Functions

autoscale(tree)

Rescale every Parameter in tree, preserving value and metadata.

dump_params(tree)

Physical value of every Parameter, frozen ones included.

freeze(tree, *selectors)

Return tree with the Parameters at selectors frozen.

freeze_all(tree)

Return tree with every Parameter frozen.

friendly_keypath(keypath)

A jax KeyPath as the dotted name friendly_path() gives.

friendly_path(parts)

Join path parts into a dotted name.

iter_parameters(tree)

Yield (path_tuple, Parameter) for every Parameter in tree.

matching_paths(tree, pattern)

Internal paths of every Parameter whose displayed name matches pattern.

n_trainable(tree, *[, include_frozen])

Number of free scalar values.

navigate(obj, path)

Follow a path tuple through a mix of eqx.Modules, dicts, lists, tuples.

parameters_table(tree)

Build a ParametersTable listing every Parameter in tree.

set_parameters(tree, params)

Set Parameters by the names parameters_table() prints.

unfreeze(tree, *selectors)

Return tree with the Parameters at selectors unfrozen.

unfreeze_all(tree)

Return tree with every Parameter unfrozen.

walk(tree, match, *[, prune, ...])

Yield (path, node) for the nodes of tree satisfying match.

Classes

ParametersTable

Pretty-printable listing of every Parameter in a pytree.

nyx.core.filters Module

Functions

per_obs_filter(tree)

Boolean mask for every per-observation leaf in tree.

select_obs(tree, index)

Slice observation index out of a stacked tree; inverse of tile_per_obs().

tile_per_obs(tree, nobs)

Give every per_obs Parameter in tree a leading (nobs, ...) axis.

Geometry and Observation

nyx.core.geometry Module

Functions

check_shared_geometry(obs_list, atmosphere, ...)

Raise unless every component was built against the same Geometry.

Classes

Geometry

Resolution and grid configuration for rendering.

nyx.core.observation Module

Classes

Observation

One target and one location, observed at nobs = len(times) times.

SunRelativeEclipticFrame

Ecliptic frame with longitude measured from the Sun.

nyx.core.coordinates Module

Functions

altaz_to_offset(az, alt, rotation)

Transform AltAz (az, alt) to offset frame (lon, lat) using rotation.

cos_angular_separation_jax(az1, alt1, az2, alt2)

JAX-compatible cosine of great-circle angular separation.

offset_to_altaz(lon, lat, rotation)

Transform offset frame (lon, lat) to AltAz; inverse of altaz_to_offset().

rotation_matrix_from_altaz(az_rad, alt_rad)

Build rotation matrix from an AltAz pointing direction.

safe_arcsin(z)

arcsin of a direction cosine, differentiable at |z| >= 1.

Units

nyx.core.units Module

Functions

energy_flux_to_photon_flux(wvls, energy_flux)

Convert energy flux to photon flux, per steradian or not.

to_angle_rad(quantity)

Convert any angle quantity to a raw array in radians.

to_wavelength_nm(quantity)

Convert any wavelength quantity to a raw array in nm.