def build_comps_from_chains(self, run_dir):
    "\n        Build compoennt objects from stored emcee chains and cooresponding\n        lnprobs.\n\n        Parameters\n        ----------\n        run_dir: str\n            Directory of an EM fit, which in the context of NaiveFit will be\n            e.g. 'myfit/1', or 'myfit/2/A'\n\n        Returns\n        -------\n        comps: [Component]\n            A list of components that correspond to the best fit from the\n            run in question.\n        "
    logging.info('Component class has been modified, reconstructing from chain')
    comps = (self.ncomps * [None])
    for i in range(self.ncomps):
        final_cdir = (run_dir + 'final/comp{}/'.format(i))
        chain = np.load((final_cdir + 'final_chain.npy'))
        lnprob = np.load((final_cdir + 'final_lnprob.npy'))
        npars = len(self.Component.PARAMETER_FORMAT)
        best_ix = np.argmax(lnprob)
        best_pars = chain.reshape((- 1), npars)[best_ix]
        comps[i] = self.Component(emcee_pars=best_pars)
    self.Component.store_raw_components(str(((run_dir + 'final/') + self.final_comps_file)), comps)
    return comps
Build compoennt objects from stored emcee chains and cooresponding
lnprobs.

Parameters
----------
run_dir: str
    Directory of an EM fit, which in the context of NaiveFit will be
    e.g. 'myfit/1', or 'myfit/2/A'

Returns
-------
comps: [Component]
    A list of components that correspond to the best fit from the
    run in question.
def build_comps_from_chains(self, run_dir):
    "\n        Build compoennt objects from stored emcee chains and cooresponding\n        lnprobs.\n\n        Parameters\n        ----------\n        run_dir: str\n            Directory of an EM fit, which in the context of NaiveFit will be\n            e.g. 'myfit/1', or 'myfit/2/A'\n\n        Returns\n        -------\n        comps: [Component]\n            A list of components that correspond to the best fit from the\n            run in question.\n        "
    logging.info('Component class has been modified, reconstructing from chain')
    comps = (self.ncomps * [None])
    for i in range(self.ncomps):
        final_cdir = (run_dir + 'final/comp{}/'.format(i))
        chain = np.load((final_cdir + 'final_chain.npy'))
        lnprob = np.load((final_cdir + 'final_lnprob.npy'))
        npars = len(self.Component.PARAMETER_FORMAT)
        best_ix = np.argmax(lnprob)
        best_pars = chain.reshape((- 1), npars)[best_ix]
        comps[i] = self.Component(emcee_pars=best_pars)
    self.Component.store_raw_components(str(((run_dir + 'final/') + self.final_comps_file)), comps)
    return comps