plots.py File Reference

Python script to generate triangle, trace, log-likelihoood and chi2 plots. More...

Functions

def triangle_plot (fileName, nwalkers, burnIn)
 Function to generate the triangle plot. More...
 
def trace_plot (fileName, nwalkers, burnIn)
 Function to geneerate the trace plots. More...
 
def lklhd_plot (fileName, burnIn)
 Plots the log-likelihood values. More...
 
def chi2_plot (fileName, dof)
 Plots the chi-squared values. More...
 

Variables

tuple parser = argparse.ArgumentParser()
 
string help = "MCMC chain file to generate the triangle/trace plots."
 
tuple args = parser.parse_args()
 
tuple filetype = args.filetype.lower()
 

Detailed Description

Authors
Mansour Karami, Jorge A. Preciado, Roman Gold
Date
May 2017

This is a Python script to generate plots from the MCMC chain, likelihood and chi-squared files.

Different plots are generated by passeing the appropriate options to the script:

 ./plots.py [options] 

The available list of options are:

  -h, --help   Show the help message explaining the various available options 
  -s, --chain-file [FILE]  Makes the triangle plot and the trace plots from 
 the provided MCMC chain file. The name of the variables could be provided as a list 
 of comma-separated names in a commented line starting with "#" in the chain file.
 If the names are provided they will be used to label the axis in the plots, otherwise 
 default names are chosen.
 -l, --likelihood-file [FILE]  Makes the likelihood plot from the provided likeliood file 
 -c, --chi2-file [FILE]    Makes the chi-squared plot from the provided chi-squared file
 -n, --num-walkers [INTEGER]  Optional number of walkers used to generate the chain file. 
 -b, --burn-in  [INTEGER]  Optional number of burn in samples to exclude from the triangle plot
 -t, --type [EXT]   Optional filetype extension for output figures (defaults to pdf).