ensemble_hic/setup_functions.py
def make_conditional_posterior(posterior, settings):
    """
    Conditions the posterior on the fixed variables

    :param posterior: full posterior distribution
    :type posterior: :class:`binf.pdf.posteriors.Posterior`

    :param settings: simulation settings as specified in a
                     config file
    :type settings: dict of dicts

    :returns: a copy of the input posterior distribution, but with
              some variables set to values specified in settings
    :rtype: :class:`binf.pdf.posteriors.Posterior`
    """
    variables = settings['general']['variables'].split(',')
    variables = [x.strip() for x in variables]
    p = posterior

    if not 'norm' in variables:
        return p.conditional_factory(norm=settings['initial_state']['norm'])
    else:
        return p

    Conditions the posterior on the fixed variables

    :param posterior: full posterior distribution
    :type posterior: :class:`binf.pdf.posteriors.Posterior`

    :param settings: simulation settings as specified in a
                     config file
    :type settings: dict of dicts

    :returns: a copy of the input posterior distribution, but with
              some variables set to values specified in settings
    :rtype: :class:`binf.pdf.posteriors.Posterior`
    
Conditions the posterior on the fixed variables
Conditions the posterior on the fixed variables
def make_conditional_posterior(posterior, settings):
    variables = settings['general']['variables'].split(',')
    variables = [x.strip() for x in variables]
    p = posterior
    if not 'norm' in variables:
        return p.conditional_factory(norm=settings['initial_state']['norm'])
    else:
        return p
def make_conditional_posterior ( posterior , settings ) : variables = settings [ 'general' ] [ 'variables' ] . split ( ',' ) variables = [ x . strip ( ) for x in variables ] p = posterior if not 'norm' in variables : return p . conditional_factory ( norm = settings [ 'initial_state' ] [ 'norm' ] ) else : return p
Conditions the posterior on the fixed variables
Conditions the posterior on the fixed variables
"""
    Conditions the posterior on the fixed variables

    :param posterior: full posterior distribution
    :type posterior: :class:`binf.pdf.posteriors.Posterior`

    :param settings: simulation settings as specified in a
                     config file
    :type settings: dict of dicts

    :returns: a copy of the input posterior distribution, but with
              some variables set to values specified in settings
    :rtype: :class:`binf.pdf.posteriors.Posterior`
    """
a copy of the input posterior distribution, but with
some variables set to values specified in settings
a copy of the input posterior distribution but with some variables set to values specified in settings
:class:`binf.pdf.posteriors.Posterior`
posterior
full posterior distribution
full posterior distribution
settings
simulation settings as specified in a
config file
simulation settings as specified in a config file