emceeChain

class eazy.utils.emceeChain(chain=None, file=None, param_names=[], burn_fraction=0.5, sampler=None)[source]

Bases: object

Methods Summary

contour(p1, p2[, labels, levels, colors, ...])

Plot sigma contours

draw_random([N])

Draw random sets of parameters from the chain

get_stats(pid[, burn, raw])

Get percentile statistics for a parameter in the chain

load_chain([file])

Read the chain from the pickle file

load_fits([file])

Load emcee chain fits file created by save_fits.

parameter_correlations([size, shrink, show, ...])

process_chain([param_names, burn_fraction])

Define parameter names and get parameter statistics

save_chain([file, verbose])

Save the chain to a Pkl file

save_fits([file, verbose])

Make a FITS file of an EMCEE chain

show_chain([param, chain, alpha, color, ...])

Make a plot of the chain for a given parameter.

Methods Documentation

contour(p1, p2, labels=None, levels=[0.683, 0.955], colors=None, limits=None, bins=20, ax=None, fill=False, **kwargs)[source]

Plot sigma contours

draw_random(N=10)[source]

Draw random sets of parameters from the chain

get_stats(pid, burn=0, raw=False)[source]

Get percentile statistics for a parameter in the chain

load_chain(file='emcee_chain.pkl')[source]

Read the chain from the pickle file

load_fits(file='emcee_chain.fits')[source]

Load emcee chain fits file created by save_fits.

parameter_correlations(size=8, shrink=5, show=None, file=None)[source]
process_chain(param_names=[], burn_fraction=0.5)[source]

Define parameter names and get parameter statistics

save_chain(file='emcee_chain.pkl', verbose=True)[source]

Save the chain to a Pkl file

save_fits(file='emcee_chain.fits', verbose=True)[source]

Make a FITS file of an EMCEE chain

show_chain(param='a1', chain=None, alpha=0.15, color='blue', scale=1, diff=0, ax=None, add_labels=True, hist=False, autoscale=True, *args, **kwargs)[source]

Make a plot of the chain for a given parameter.

For plotting, multiply the parameter by scale and subtract diff.