Forward model for mm-source catalogs, with a Julia baseline path and a Reactant tracing/compiled path.
The main entrypoint is:
gen_pysides_from_original.jl
It loads a SIDES catalog, generates SFR/magnification/flux columns, and runs benchmark timings.
gen_pysides_from_original.jl: main driver and benchmark harness.gen_sfr_props.jl: SFR-related computations (gen_sfr_props2is currently used by the driver).gen_magnification.jl: magnification generation.gen_fluxes.jl: SED/flux/LFIR generation.load_params.jl: parser forSIDES_from_original.par.load_sides_csv.jl: CSV loader for SIDES catalog inputs.data/: input catalogs (SIDES_Bethermin2017_short2.csv,SIDES_Bethermin2017_short.csv).SIDES_from_original.par: parameter file consumed by the pipeline.SED_finegrid_dict.h5,LFIR_LIR_ratio.h5,Psupmu_table_Bethermin17.txt: required data assets.
- Julia with project environment support.
- Files above available at their expected paths.
- For Reactant local development in this repo,
Reactant.jl/is a symlink to a local checkout.
From repo root:
julia --project=. gen_pysides_from_original.jlThis command:
- Loads parameters and catalog input.
- Preallocates output columns on the catalog.
- Runs benchmark process paths.
- Writes a formatted benchmark summary to a text file.
In gen_pysides_from_original.jl, update csv_idl_path near the bottom:
- Small/debug run:
data/SIDES_Bethermin2017_short2.csv - Large benchmark run:
data/SIDES_Bethermin2017_short.csv
The script writes a formatted benchmark report via format_benchmark_report(...).
Typical output files used in this repo:
benchmark_results_small.txtbenchmark_results_large.txt
The report includes:
- dataset path
- backend (
cpu) - seed
- timing table
- derived ratios
Important knobs in gen_pysides_from_original.jl:
BENCHMARK_SEED = 1234Reactant.set_default_backend("cpu")- parameter file path:
"SIDES_from_original.par"
If you are comparing runs, keep seed and dataset fixed.
Use @allowscalar only where scalar get/set is required (for example explicit index reads/writes inside traced loops).
Prefer mask-based formulations with ifelse.(mask, a, b) rather than findall(mask) + indexed writes.
Compiled/traced calls can dispatch asynchronously; if timings look unrealistically tiny, ensure your timing method includes synchronization.
Check:
SIDES_from_original.pardata/SIDES_Bethermin2017_short*.csvSED_finegrid_dict.h5LFIR_LIR_ratio.h5Psupmu_table_Bethermin17.txt
- This repo currently contains several MWE scripts (
mwe_*.jl) used for Reactant debugging. - Keep helper scripts focused; most orchestration should stay in
gen_pysides_from_original.jl.