Deep learning for Cosmological Heterogeneity and Astrophysical Reconstruction via Tomography
This project implements a 3D tomographic reconstruction pipeline using Ly(\alpha) forest skewers and galaxy positions as input to reconstruct the dark matter (DM) density field. It is built using PyTorch and leverages a variational autoencoder (VAE) with a U-Net-based 3D convolutional neural network.
DeepCHART/
βββ config.py # Configuration for training, model, and paths
βββ dataset.py # Custom PyTorch Dataset class for tau, galaxy, DM
βββ model.py # 3D VAE-UNet model with anisotropic kernels
βββ train.py # Training pipeline
βββ README.md # Project description
- Two-channel input: sparse Ly(\alpha) forest and galaxy CIC fields
- Output: log-scaled 3D dark matter density
- Anisotropic volume support: reconstructs volumes of shape (N_\text{section} \times N_\text{section} \times Z_\text{section})
- Realistic noise model: SNR-based Gaussian noise injection in the flux
- Modular VAE-UNet: residual blocks, skip connections, and latent sampling
- Input & output volumes are extracted as:
shape = (N_SECTION, N_SECTION, Z_SECTION) # typically 96 x 96 x 288
- Sliced from parent cubes of size
N = 128(configurable)
Edit config.py to set:
- Data paths
- Network hyperparameters
- Volume shape (
N_SECTION,Z_SECTION) - SNR distribution and augmentation parameters
python train.py- Model checkpoint:
model_tomography_...pth - Training log:
Output_F_galaxy_DM_...txt - Loss plot:
training_history.png
Minimal requirements :
numpy
scipy
torch
matplotlib
If you use this code, please consider citing:
Maitra et al. 2025, DeepCHART: Mapping the 3D dark matter density field from LyΞ± forest surveys using deep learning, arXiv:2507.00135