From 3101a2f74893c94e452a797d6fc35da863d1b2cb Mon Sep 17 00:00:00 2001 From: pciturri Date: Thu, 16 Nov 2023 00:35:44 +0100 Subject: [PATCH] fix: negbinom consistency plots now have the correct boundaries --- csep/utils/plots.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/csep/utils/plots.py b/csep/utils/plots.py index 01d2c24d..e88cc1a7 100644 --- a/csep/utils/plots.py +++ b/csep/utils/plots.py @@ -1856,9 +1856,9 @@ def plot_consistency_test(eval_results, normalize=False, axes=None, mean = res.test_distribution[1] upsilon = 1.0 - ((var - mean) / var) tau = (mean ** 2 / (var - mean)) - phigh = scipy.stats.nbinom.ppf((1 - percentile / 100.) / 2., tau, + plow = scipy.stats.nbinom.ppf((1 - percentile / 100.) / 2., tau, upsilon) - plow = scipy.stats.nbinom.ppf(1 - (1 - percentile / 100.) / 2., + phigh = scipy.stats.nbinom.ppf(1 - (1 - percentile / 100.) / 2., tau, upsilon) # empirical distributions