Run Setup
Use the science preset unless you are debugging internals:
configs/fs2_phz1_science.yaml
This preset expands to the full internal schema at load time. Every audited run
writes normalized_config.json beside the outputs.
Main Commands
MAP fit:
euclid-dsps fit \
--limit 1000 \
--batch-size 512 \
--sed-samples 16 \
--out outputs/runs/science_fit
One row:
euclid-dsps fit --index 0 --out outputs/runs/row0_fit
Posterior subset:
euclid-dsps posterior \
--row-indices-file outputs/rows_for_hmc.txt \
--num-warmup 300 \
--num-samples 800 \
--out outputs/runs/posterior_subset
Checks without fitting:
euclid-dsps check --kind eda --out outputs/check/eda
euclid-dsps check --index 0 --out outputs/check/row0_forward
euclid-dsps check --kind cosmos --limit 20 --out outputs/check/cosmos
Optional reproducible wrapper:
snakemake -j1
Override Snakemake run settings with --config run_dir=... limit=....
Config Shorthands
runtime: autoDefault science runtime. Lets JAX choose an available backend and clears stale
JAX_PLATFORMS=cudavalues inside the process, so CPU-only conda installs do not fail before fitting starts.runtime: gpuExpands to CUDA JAX settings with
require_gpu: trueand NVIDIA device check. Use only when the active environment exposes CUDA JAX.bands: lsst_euclid_10Expands to LSST
ugrizyplus Euclid VIS/Y/J/H with local passbands fromfilters/and catalog flux-error columns for all ten bands.bands: euclid_4Expands to Euclid VIS/Y/J/H only.
fit.likelihood_space: fluxUses Gaussian residuals in
Fnucgs flux units for MAP and MCMC inference.magremains available for legacy comparisons.selection.nondetection_policy: gaussian_fluxKeeps finite negative/non-positive flux measurements when a valid flux error exists.
dropis the legacy positive-flux-only behavior.upper_limitis reserved and fails validation until an upper-limit likelihood exists.band_calibration.mode: fixed_offsetsApplies fixed per-band magnitude offsets or flux multipliers to the model during likelihood evaluation. Defaults are null and do not change physics.
column_groupsReplaces long
extra_columnslists. Useful groups aretruth_basic,cosmos_proxy,photometry_errors,emission_line_diagnostics, andmorphology_halo.phz_diagnosticsexists only for explicit audits.dust_model: cosmos_proxy_fixedInjects COSMOS dust columns into DSPS. These values are copied from the row and must not be interpreted as catalog truth. Dust can be fitted in alternate configs, but catalog dust columns remain proxy-only diagnostics.
nebular_emission: ssp_fluxCurrent default. The DSPS forward model uses the SSP
ssp_fluxtable as provided. If the SSP contains line-like features, they are already inside that flux table. Separatessp_emline_*datasets are read for diagnostics only.noneandemline_tableare reserved config values; neither should be used as a science likelihood until a no-double-count convention is defined.
Science Meaning
The current fit infers:
z_obs;log10_formed_mass_msun;lognormal SFH shape
sfh_t_peakandsfh_tau;stellar metallicity proxy
log10_metallicity;derived current SFR from fitted mass plus SFH shape.
Truth columns are diagnostics only. The science preset fits z_obs from
Euclid + LSST photometry with no photo-z prior and no phz_median
initialization. redshift.initial: fixed only supplies the MAP starting
value; z_obs remains a free bounded parameter. Multi-start MAP redshift was
removed because posterior sampling is the intended inference path.
phz_median remains available only through the optional phz_diagnostics
column group. PHZ interval priors were removed.
reduced_chi2 now means chi2 / dof with
dof = max(n_valid_bands - n_free_effective, 1). The older per-band metric is
reported separately as chi2_per_band.
Performance outputs are written for every MAP batch:
batch_fit_performance_summary.jsoncontains wall time, seconds per galaxy, throughput, backend/device metadata, and GPU-hour per galaxy when JAX actually uses a GPU backend;batch_fit_performance_by_batch.csvcontains chunk-level throughput.
Redshift attractor outputs are written as batch_fit_redshift_attractors.csv
and batch_fit_redshift_attractors.png. They summarize repeated MAP redshift
modes and are diagnostic only, not a global optimizer.
Current priors are broad weak_physical priors. They are not yet POP-COSMOS
priors. A POP-COSMOS-like mode needs exact variable mapping and learned
population-prior calibration before it should be used.
Legacy configs live under configs/legacy as examples only. Active runs
should start from fit, posterior, and check.