Exemple #1
0
def build_Asimov_data(model: pyhf.Model, with_aux: bool = True) -> List[float]:
    """Get asimov dataset for a model

    Args:
        model (pyhf.Model): the model for which to construct the asimov data
        with_aux (bool, optional): with or without auxdata. Defaults to True.

    Returns:
        List[float]: asimov data
    """

    asimov_data = model.expected_data(
        get_asimov_parameters(model), include_auxdata=with_aux
    ).tolist()
    return asimov_data
Exemple #2
0
def build_Asimov_data(model: pyhf.Model, with_aux: bool = True) -> List[float]:
    """Returns the Asimov dataset (optionally with auxdata) for a model.

    Initial parameter settings for normalization factors in the workspace are treated as
    the default settings for that parameter. Fitting the Asimov dataset will recover
    these initial settings as the maximum likelihood estimate for normalization factors.
    Initial settings for other modifiers are ignored.

    Args:
        model (pyhf.Model): the model from which to construct the dataset
        with_aux (bool, optional): whether to also return auxdata, defaults to True

    Returns:
        List[float]: the Asimov dataset
    """
    asimov_data = model.expected_data(get_asimov_parameters(model),
                                      include_auxdata=with_aux).tolist()
    return asimov_data