slophep.Predictions.SamplingTools
- slophep.Predictions.SamplingTools.bifurcated_gaussian_sampler(mean: list[float], errlo: list[float], errhi: list[float], correlation: ndarray, rng: Generator, cutoff: int = -1) list[float][source]
Generate a random sample from bifurcated gaussian using rejection method. For asymmetric errors.
- Parameters:
mean (list[float]) – Nominal/mean values for the parameters
errlo (list[float]) – Lower error
errhi (list[float]) – Upper error
correlation (np.ndarray) – Correlation matrix
rng (np.random.Generator) – Numpy generator object
cutoff (int, optional) – Number of attempts to cutoff at, by default -1. Negative means no cutoff.
- Returns:
Fluctuated parameters
- Return type:
list[float]
- Raises:
Exception – If cutoff is reached, raises exception and stops