Skip to content

Getting Starting with the Analysis Package

Eric Gentry edited this page Jun 14, 2016 · 1 revision

This project was designed to create hierarchical data. (A parameter study consisting of simulations, which consist of timesteps which consists of cells, which consist of various properties). Because of that, the analysis notebooks are used to show different levels of detail. But the highest-level notebooks require that hundreds of simulations be reduced, and that takes a while. So certain values are calculated once, then stored in a SQLite database---start with the wrong notebook, and it won't be able to find a database with any results.

So here's a suggested workflow:

  1. visualize.ipynb
  • This will parse a single simulation, and allow you to plot any saved variable at any timestep.
  • It shows a few ways to use the RunSummary class. This is the core class of the parsed results.
  1. database_overview.ipynb
  • Once you have a number of simulations ready, this'll let you build that SQLite database.

At this point it's pretty flexible. The ones below can more-or-less be done in any order.

  1. publication_plots.ipynb
  • See how I made the plots included in the paper. This should give plenty of examples of how to use the main classes in the package.
  1. Momentum_scaling.ipynb
  • Once you have a database populated, you can now start plotting the reduced results from multiple simulations. In particular, this notebook has some interactive ways of plotting momentum vs. cluster mass, for clusters of the same gas density and metallicity
  1. bayesian_fitting.ipynb
  • This fits a Bayesian model to the simulations in the database. It also saves the resulting MCMC samples as an HDF5 file.
  1. momentum_surface_fitting.ipynb
  • This shows a few results of fitting the momentum model. If you don't have the MCMC samples, you should probably be fine commenting out any line with "Bayesian" in it.