Skip to content

Maxelee/STAR_emu

Repository files navigation

STAR_emu

Stellar-to-halo mass Relation Emulator for CAMELS-IllustrisTNG simulations.

A fast polynomial ridge-regression emulator that predicts the stellar–halo mass relation (SHMR) as a function of 6 cosmological and astrophysical parameters, trained on 1,000 Latin Hypercube simulations from the CAMELS project.

Quick start

from star_emu import SHMREmulator
import numpy as np

emu = SHMREmulator()

log_mhalo = np.linspace(10.5, 13.5, 50)
log_mstar = emu.predict(log_mhalo,
                        Omega_m=0.3, sigma_8=0.8,
                        A_SN1=1.0, A_AGN1=1.0,
                        A_SN2=1.0, A_AGN2=1.0)

Parameters

Parameter Description Range
Ω_m Matter density 0.1 – 0.5
σ_8 Clustering amplitude 0.6 – 1.0
A_SN1 Supernova feedback strength 0.25 – 4.0
A_AGN1 AGN feedback strength 0.25 – 4.0
A_SN2 Supernova feedback speed 0.5 – 2.0
A_AGN2 AGN feedback speed 0.5 – 2.0

Files

File Description
star_emu.py Emulator module (SHMREmulator class)
extract_shmr.py Data extraction script (requires access to CAMELS HDF5 catalogs)
data/emulator_model.npz Pre-trained model weights
data/shmr_data.npz Extracted SHMR data from 1,000 simulations
emulator_lab.ipynb Interactive student lab notebook (~2 hr)
emulator_lab_solutions.ipynb Solutions notebook
emulator_tutorial.ipynb Reference tutorial notebook

Requirements

  • Python ≥ 3.8
  • numpy
  • matplotlib (for notebooks)

Lab notebook

The emulator_lab.ipynb notebook is a self-contained ~2 hour lab session designed for students with no prior machine-learning experience. It builds up from scatter plots and best-fit lines to polynomial regression and emulator construction, with guided exercises and challenge problems.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors