# normalise_hb

selfisys.normalise_hb.define_normalisation(hidden_box: HiddenBox, Pbins: ndarray, cosmo: Dict[str, Any], N: int, min_k_norma: float = 0.04, npar: int = 1, force: bool = False) → ndarray

  Define the normalisation constants for the HiddenBox instance.

  Parameters:

    - hidden_box (HiddenBox) – Instance of the HiddenBox class.

    - Pbins (ndarray) – Array of P bin values.

    - cosmo (dict) – Cosmological and infrastructure parameters.

    - N (int) – Number of realisations required.

    - min_k_norma (float, optional) – Minimum k value to compute the normalisation constants.

    - npar (int, optional) – Number of parallel processes to use. Default is 1.

    - force (bool, optional) – If True, force recomputation. Default is False.

  Returns:

    norm_csts – Normalisation constants for the HiddenBox instance.

  Return type:

    ndarray

selfisys.normalise_hb.worker_normalisation(hidden_box: HiddenBox, params: Tuple[Dict[str, Any], list, list, bool]) → ndarray

  Worker function to compute the normalisation constants, compatible with Python multiprocessing.

  Parameters:

    - hidden_box (HiddenBox) – Instance of the HiddenBox class.

    - params (tuple) – A tuple containing (cosmo, seedphase, seednoise, force).

  Returns:

    phi – Computed summary statistics.

  Return type:

    ndarray

selfisys.normalise_hb.worker_normalisation_public(hidden_box, cosmo: Dict[str, Any], N: int, i: int)

  Run the i-th simulation required to compute the normalisation constants.

  Parameters:

    - hidden_box (HiddenBox) – Instance of the HiddenBox class.

    - cosmo (dict) – Cosmological and some infrastructure parameters.

    - N (int) – Total number of realisations required.

    - i (int) – Index of the simulation to be computed.

selfisys.normalise_hb.worker_normalisation_wrapper(args)

  Wrapper function for the worker_normalisation function.

  Parameters:

    args (tuple) – A tuple containing (hidden_box, params).

  Returns:

    phi – Computed summary statistics.

  Return type:

    ndarray