From 19d367ddcee609fa1b7aea142259da138c06d9cb Mon Sep 17 00:00:00 2001 From: Gregory Ashton <gregory.ashton@ligo.org> Date: Tue, 11 Apr 2017 13:03:13 +0200 Subject: [PATCH] Fix bashplotlib dependency Makes this an optional module, adds it to the requirements and README.md --- README.md | 4 ++++ pyfstat/core.py | 2 +- requirements.txt | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 957db98..bbe2d23 100644 --- a/README.md +++ b/README.md @@ -49,8 +49,12 @@ $ git clone git@gitlab.aei.uni-hannover.de:GregAshton/PyFstat.git * [emcee](http://dan.iel.fm/emcee/current/) * [corner](https://pypi.python.org/pypi/corner/) * [dill](https://pypi.python.org/pypi/dill) + +*Optional* * [tqdm](https://pypi.python.org/pypi/tqdm)(optional), if installed, this provides a useful progress bar and estimate of the remaining run-time. +* [bashplotlib](https://github.com/glamp/bashplotlib), if installed, presents + a histogram of the loaded SFT data For an introduction to installing modules see [here](https://docs.python.org/3.5/installing/index.html). If you are using diff --git a/pyfstat/core.py b/pyfstat/core.py index a8c713c..e4f3a1a 100755 --- a/pyfstat/core.py +++ b/pyfstat/core.py @@ -249,7 +249,7 @@ class ComputeFstat(object): from bashplotlib.histogram import plot_hist print('Data timestamps histogram:') plot_hist(SFT_timestamps, height=5, bincount=50) - except IOError: + except ImportError: pass if len(detector_names) == 0: raise ValueError('No data loaded.') diff --git a/requirements.txt b/requirements.txt index e4ff43e..c34c508 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,5 +5,6 @@ emcee corner dill tqdm +bashplotlib -- GitLab