Skip to content
Painting baryons on N-body simulations with deep generative models
Jupyter Notebook Python Fortran Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
baryon_painter
code/make_grid
notebooks
scripts
tests
trained_models
README.md
setup.py

README.md

Baryon Painter

The baryon painter is a set of deep generative models (currently a CVAE and CGAN) that maps matter density to pressure. The results are described in T. Tröster et al, 2019.

Sample tiles

Usage

Both the CVAE and CGAN expose a simple interface, the paint method, that takes a dark matter density tile and its redshift as input and generates the corresponding pressure tile:

import baryon_painter.painter

model_path = "trained_models/CVAE/fiducial/"

painter = baryon_painter.painter.CVAEPainter((os.path.join(model_path, "model_state"),
                                              os.path.join(model_path, "model_meta")))
                                             
pressure_tile_generated = painter.paint(input=dm_tile, 
                                        z=redshift_of_tile, 
                                        transform=True, inverse_transform=True)

An example notebook (used to make the plot of the sample tiles above) can be found here: here

Other potential useful scipts"

  • the training script for the CVAE: here
  • the script for the light-cone generation: here

The architectures and training schedules of the fiducial models are described here.

You can’t perform that action at this time.