From 37ed561f73c0deb86f7300a9db9ba53dd0f15438 Mon Sep 17 00:00:00 2001 From: sebastianp Date: Tue, 9 Aug 2016 12:21:00 +0200 Subject: [PATCH] removing unnecessary code --- pylot/core/pick/compare.py | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/pylot/core/pick/compare.py b/pylot/core/pick/compare.py index 39f43a3a..3116f137 100644 --- a/pylot/core/pick/compare.py +++ b/pylot/core/pick/compare.py @@ -382,24 +382,16 @@ class PDFstatistics(object): def getQD(self,value): QDlist = [] for pdf in self: - try: - QD = pdf.quantile_distance(value) - QDlist.append(QD) - except AttributeError as e: - if e.message == "'float' object has no attribute 'quantile_distance'": - continue + QD = pdf.quantile_distance(value) + QDlist.append(QD) return QDlist def getQDQ(self,value): QDQlist = [] for pdf in self: - try: - QDQ = pdf.qtile_dist_quot(value) - QDQlist.append(QDQ) - except AttributeError as e: - if e.message == "'float' object has no attribute 'quantile_distance'": - continue + QDQ = pdf.qtile_dist_quot(value) + QDQlist.append(QDQ) return QDQlist @@ -413,6 +405,7 @@ class PDFstatistics(object): std = np.array(std) self.set_stdarray(std) + def set_stdarray(self, array): if self.return_phase == 'P': self.p_stdarray = array @@ -471,7 +464,6 @@ def main(): Insheim.getSTD() qdlist = Insheim.getQDQ(0.3) binlist = Insheim.getBinList(0.,3.) - Insheim.histplot(qdlist,binlist) print qdlist