Unpacking the model grids…
The spectrum of a galaxy is the light of its stars, changed by the gas and dust it passes through. Here you can see how each ingredient changes what a galaxy looks like, and how it would appear through the filters and spectrographs of many telescopes. The browser runs a port of the forward model of CERIDWEN, a very fast SED-fitting code (worth a look).
The v2 fits on the other pages have no dust emission; this shows what it adds.
Runaway. A fraction of the young stars' light leaves its birth cloud without meeting the cloud's dust, but still crosses the galaxy's dust. The hydrogen-ionising light that escapes is not turned into emission lines, so the lines and the nebular continuum weaken by the same fraction.
Picket fence. A fraction of the light of stars younger than 20 Myr leaves through holes with no gas and no dust at all, ionising light included. Only the covered part lights up the gas and is dimmed by dust. This one changes the ultraviolet continuum directly.
For astronomers. CSPBasis(fesc_geometry=...), ceridwen 1.0.13. runaway_bc (FSPS add_dust.f90 parity): every SSP row's birth-cloud transmission becomes (1 − f) TBC + f, the young rows keep a fraction f of their λ < 912 Å light with no birth-cloud dust, the nebular amplitude is (1 − f) (ceridwen/csp/csp.py:1628, :1702). picket: a fraction f of the young rows (the nebular grid's ages, to 107.3 yr) passes no birth-cloud or diffuse dust and no nebular reprocessing; the covered 1 − f powers the nebular emission and is attenuated by both screens (csp.py:1637–1669; GOTCHAS §21). Line fluxes are × (1 − f); with runaway their birth-cloud attenuation is mixed the same way (predict_line_fluxes). In the v2 runs: bursty_fesc_runaway and bursty_fesc_picket, f ~ U(0, 1).
Drag a bar to change how many stars formed in that time bin (log scale). Ages are lookback times before the moment we see the galaxy; bins younger than 10.7 Myr are drawn darker. The bars are rescaled so the total formed mass stays at the mass slider.
For astronomers. 12 bins: edges 0, 3, 5, 10, 15, 30, 50 Myr, then 6 bins log-spaced to age(z) − age(z = 30) (sfmsfit/config.py:64, Z_LIMIT_SFH = 30). Piecewise-constant SFR per bin, weights from the overlap of each bin with the SSP age cells (ceridwen/csp/csp.py:1443, _ssp_weights, step mode). Normalised to 1 M⊙ formed over the bin edges, then × 10logmass (sfmsfit/model.py:72). In the fits the sampled quantity is logsfr_ratios, the residual around the rising-SFMS mean μ(logmass), Student-t with df = 2 and scale 0.5 (bursty tree; sfmsfit/model.py:243–256). The bars here set the physical SFR directly.
Draws each survey's filters and computes the galaxy's brightness in every band, with the filter projection the fit uses.
Bars along the top of the plot show the wavelengths each mode records; hover a name for its resolving power and source.
Unpacking the model grids…
Brightness of the model galaxy in every band of the surveys switched on (Surveys and filters). Lines: the share of the band's flux that comes from emission lines.
| Band | λeff (µm) | Fν (nJy) | AB mag | Lines |
|---|
Integrated fluxes of the main nebular lines, as CERIDWEN predicts them for a line measurement (after dust and the intergalactic medium). EW: rest-frame equivalent width against the model continuum at the line. Band: where the line falls among the surveys switched on.
| Line | λobs (µm) | Flux (10⁻¹⁸ erg s⁻¹ cm⁻²) | EW0 (Å) | AGN | Band |
|---|
Choose which ingredients vary and how, which measurements to make and how much noise to add, then generate the table with the same model as the explorer and save it as CSV.
The browser works from a compressed copy of CERIDWEN's model grids, so these numbers match CERIDWEN to about 0.1% for band fluxes and line fluxes and to about 1% for spectra (see How this was built). For science, use the Python script at the bottom of this page rather than the CSV: it runs CERIDWEN itself, and you can change any setting in it, including ones this page does not offer.
Fixed: one value. Grid: evenly spaced from min to max in the given number of steps. Random: drawn uniformly between min and max. Every combination of the grid values is made; random parameters are drawn anew for each of the repeats.
| Parameter | Mode | Value / min | max | steps |
|---|
Photometry: every band of the chosen surveys, with the fit's filter projection. Lines: integrated fluxes as a line measurement sees them (dust and intergalactic medium included). Spectrum: the observed-frame model spectrum at the model's own resolution, in Fν.
Main lines (doublets summed):
CERIDWEN's Spectrum prediction: the galaxy's velocity dispersion (from the Explorer, default 300 km/s), then a Gaussian line-spread function of constant resolving power R (FWHM; the SSP library's own width removed), on pixels spaced log-uniformly at the chosen sampling; lines painted with the gas and instrument widths. Choosing an instrument fills in its nominal R and wavelength range from the Spectrographs list; real resolving powers vary along the spectrum (the NIRSpec prism from about 30 to 300), which a constant R does not capture. "None" gives the model's own pixels with no instrument.
Noise is Gaussian with the stated σ; S/N sets σ = F/S/N, a depth sets σ = F(5σ)/5 in every band it lists (bands it does not list get the floor alone), the flux limit is in 10⁻¹⁸ erg s⁻¹ cm⁻². The floor is a fractional error added in quadrature: σ² = σ₀² + (floor × F)². The table holds the true value, the noisy value and σ.
The same set-up as a stand-alone Python script for CERIDWEN (pip install ceridwen; FSPS data in $SPS_HOME). It rebuilds the model with the package itself, so its numbers are the reference; the page's own values agree with it to about 10⁻³. With the AGN switched on it needs the CERIDWEN branch agn2/integration. Saved as ceridwen_mock.py.txt: rename it to .py.
| The first rows of the table appear here. |
The galaxy is the one you built in the Explorer. Give a position on the sky and an exposure time; the page estimates the signal-to-noise in JWST's cameras and spectrographs. Everything updates as you change it.
bash run_etc.sh Change it here or in the Explorer; both stay in step.
The galaxy is the one you built in the Explorer. Choose how it is observed: the spectrograph's resolution, the noise and its quirks, a calibration error, a few bad pixels. The page draws mock data the way CERIDWEN's likelihood assumes they arise, and shows what a fit would make of them. Each control is a CERIDWEN parameter, named in its "What it does" note; the code at the bottom sets them all.
The galaxy (grey dashed): the truth, the Explorer's model spectrum before any instrument. What the instrument records (blue): the same spectrum blurred by the spectrograph's resolution and line-spread function and multiplied by its flux calibration, before any noise. The measured data (dots): that, plus noise; the shaded band is the uncertainty the fit assumes (σeff). The fit compares the data with the blue curve.
Photometry has no instrument effects here beyond the filter curves; only the noise terms apply.
The galaxy through each filter (blue bars): the truth, no noise. The measured fluxes (points with error bars, the uncertainty the fit assumes): with noise; arrows are upper limits, red points were drawn as bad bands, rings mark bands the outlier mixture gives a probability above ½ of being bad.
These observations and noise settings in Python. Here every noise term is fixed with a constant transform, which is how CERIDWEN fixes any parameter; to fit one, put it in free_param_init with a prior instead. The Build a model tab writes a whole fitting script.
Put a CERIDWEN fit together in four steps: your data, the model and its priors, the sampler, and the script. Fill in your measurements in the script's load_data() and run it; everything else is set up.
What you measured. Each observation has its own noise terms; leave them off unless you need them.
Tick the instruments you have; their filters go into one Photometry. Edit the list below to keep only your bands (or type any of CERIDWEN's 296 filter names).
Switch on what your spectrum needs; the script then asks for the values (the resolving power, the noise floor, the mask) in load_data(), with a comment on each.
The lines in your script, with their index in CERIDWEN's nebular grid. Add more from the list of all grid lines below; the script lists them so you can also edit them there.
The ingredients, one at a time. Each lists its parameters: free (sampled from the prior), fixed (held at the value), or off.
Which one. Nested sampling gives the evidence (to compare models) and copes with several separate solutions; it needs a proper prior on every parameter, which the script has. NUTS follows gradients and scales better to many parameters (dozens and more), but gives no evidence and can miss a second solution far from the first. MAP first (optimize=True): L-BFGS from prior draws; NUTS then starts its chains there, nested sampling only records it.
num_live: the resolution of the run, and its cost (∝ num_live). A rule of thumb is at least ~25 per free parameter ( here); 500 is CERIDWEN's fitSED default. More for multimodal posteriors or a precise evidence.
num_inner_steps: slice-sampling steps that make each new live point; too few and the new points are not independent of the old, which biases the result. A few times the number of free parameters is safe (the adapter's own default is 5 per parameter; fitSED uses 30). Raise it if the posterior changes when you double it.
num_delete: blank = num_live / 5. More per iteration is faster (and fits a GPU better) at a slightly coarser resolution of the likelihood contours.
logZ_tol: the run stops when the live points could add less than etol of the evidence; −5 is safe, −2 is enough for a quick test.
checkpoint_interval_s: a killed run continues from the last checkpoint bit for bit (resume_from=); 0 switches it off.
num_chains, num_samples: at least 4 chains, so that their agreement (R̂ close to 1) can be checked; the samples per chain set the effective sample size, which correlated parameters reduce.
num_warmup: blank = 1500 (200 with a variational map). The step size and the mass matrix are tuned here; too short and the chains move badly.
target_acceptance: higher means smaller steps, needed for curved or narrow posteriors (divergences); 0.8 is faster for simple ones. CERIDWEN's default is 0.95.
max_num_doublings: up to 2depth leapfrog steps per sample (10 = 1024); raise it if many samples hit the limit.
dense_mass: dense learns the correlations between parameters (default without VI); diagonal is cheaper with many parameters.
vi=: a map fitted first that makes the posterior look more Gaussian for NUTS; tril for correlated but roughly Gaussian posteriors, iaf for banana-shaped ones (slower to train).
Run it once with CERIDWEN_SCRIPT_CHECK=1 python fit_ceridwen.py: it builds everything on mock data and evaluates the posterior, so a set-up CERIDWEN refuses fails in seconds, not after the sampler has started. Every configuration of this tab is checked that way (How this was built).
CERIDWEN is a Python code that models the light of galaxies. This page carries a copy of its model, rewritten in JavaScript, so everything runs in your browser. The building blocks (star spectra, gas, dust) were computed once by CERIDWEN and are stored inside the page.
mist_miles_chab grid (MIST stellar tracks, MILES spectra, Chabrier IMF).MadauDampingDLA, from Prospector).We drew hundreds of random galaxies, computed each one with CERIDWEN in Python and again with this page, and compared, much as a coach compares split times. The brightness in every filter and every emission line has to agree to 0.1%. The spectrum has to agree to 0.1% on average and to 1% at worst.