Skip to content

Painting baryons on N-body simulations with deep generative models

Notifications You must be signed in to change notification settings

tilmantroester/baryon_painter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Painting baryons on N-body simulations with deep generative models

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published