MultiNestResult

class starkit.fitkit.multinest.MultiNestResult(posterior_data)[source]

Bases: object

Attributes Summary

maximum

mean

median

Methods Summary

calculate_sigmas(sigma_number)

from_hdf5(h5_fname[, key])

Reading a Multinest result from its generated HDF5 file

from_multinest_basename(basename, ...[, ...])

Reading a MultiNest result from a basename

plot_triangle([parameters])

Produce a corner plot of the chains posterior.

read_equal_posterior_data(basename, ...)

Reading the posterior data into a pandas dataframe

read_posterior_data(basename, parameter_names)

Reading the posterior data into a pandas dataframe

to_hdf(fname_or_buf[, key])

Writing the MultiNest result out to HDF5.

Attributes Documentation

maximum
mean
median

Methods Documentation

calculate_sigmas(sigma_number)[source]
classmethod from_hdf5(h5_fname, key='multinest')[source]

Reading a Multinest result from its generated HDF5 file

Parameters:
h5_fname: ~str

HDF5 filename

key: ~str

group identifier in the store

classmethod from_multinest_basename(basename, parameter_names, equal_weights=False)[source]

Reading a MultiNest result from a basename

Parameters:
basenamestr

basename (path + prefix) for a multinest run

parameter_nameslist of str

names of the fitted parameters, in the order of the columns

equal_weightsbool, optional

load the equally weighted chains instead [default False]

Returns:
MultiNestResult
plot_triangle(parameters=None, **kwargs)[source]

Produce a corner plot of the chains posterior.

Parameters:
parameterslist of str, optional

parameters to plot; by default all fitted parameters. Giving a list avoids problems with corner.py when one of the parameters has a constant value.

**kwargs

passed to corner.corner

static read_equal_posterior_data(basename, parameter_names)[source]

Reading the posterior data into a pandas dataframe

static read_posterior_data(basename, parameter_names)[source]

Reading the posterior data into a pandas dataframe

The weighted posterior file <basename>_.txt written by MultiNest has the columns weight, -2 ln L (read into the column loglikelihood) and the parameters.

to_hdf(fname_or_buf, key='multinest')[source]

Writing the MultiNest result out to HDF5.

Parameters:
fname_or_buf: ~str

filename or buffer

key: ~str

key to save it under default=’multinest’