qpym2.io.bkg_model#

Provide functionality to read background model related input (JAGS output and MCs)

Module Contents#

Functions#

read_mkchain

Read the background model fit markov chain from the JAGS h5 output (fpath). Returns – markov chain as a table with columns indicating the background component.

read_jagsh5

Read JAGS output hdf file from fpath and create a table.

API#

qpym2.io.bkg_model.read_mkchain(fpath: str) pandas.DataFrame#

Read the background model fit markov chain from the JAGS h5 output (fpath). Returns – markov chain as a table with columns indicating the background component.

qpym2.io.bkg_model.read_jagsh5(fpath: str) tuple#

Read JAGS output hdf file from fpath and create a table.

Args:
mctable: A pd.DataFrame with:

index – is the background model component name, fname – basename of the MC file path mean – mean of the full mkchain parameter std – median –

mkchain: the jags markov chain

Returns:

tuple: (mctable, mkchain)