From 79f0982558279cdc1992c2143e68b16b528340b8 Mon Sep 17 00:00:00 2001 From: Sebastianw Wehling-Benatelli Date: Mon, 13 Jun 2016 11:27:16 +0200 Subject: [PATCH] [bugfix] use only vaild values for plotting --- pylot/core/pick/compare.py | 2 +- pylot/core/util/widgets.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pylot/core/pick/compare.py b/pylot/core/pick/compare.py index 2d7b55da..2718a39f 100644 --- a/pylot/core/pick/compare.py +++ b/pylot/core/pick/compare.py @@ -155,7 +155,7 @@ class Comparison(object): method = operator.methodcaller(method_name) pdf_list = self.get_all(phase) rarray = map(method, pdf_list) - return rarray + return np.array(rarray) def get_expectation_array(self, phase): return self.get_array(phase, 'expectation') diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index 12ebbbca..71e668b6 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -238,8 +238,10 @@ class ComparisonDialog(QDialog): bbox_props = dict(boxstyle='round', facecolor='lightgrey', alpha=.7) for phase in self.phases: std = self.data.get_std_array(phase) + std = std[np.isfinite(std)] stdxlims = [0., 1.2 * max(std)] exp = self.data.get_expectation_array(phase) + exp = exp[np.isfinite(exp)] eps_exp = 0.05 * (max(exp) - min(exp)) expxlims = [min(exp) - eps_exp, max(exp) + eps_exp] axes_dict[phase]['std'].hist(std, range=stdxlims, bins=20, normed=False)