From e3dd7be8ef85b77ccee34b05ee7e2416bc06c4f4 Mon Sep 17 00:00:00 2001 From: Kipp Cannon <kipp.cannon@ligo.org> Date: Wed, 30 May 2018 16:30:57 +0900 Subject: [PATCH] gstlal-inspiral: don't define golden_ratio everywhere - get from gstlal.plotutil --- .../bin/gstlal_inspiral_lvalert_pastro_rate_posterior | 3 +-- gstlal-inspiral/bin/gstlal_inspiral_plot_banks | 4 +--- gstlal-inspiral/bin/gstlal_inspiral_plotsummary | 4 +--- gstlal-inspiral/bin/gstlal_inspiral_rate_posterior | 5 +---- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/gstlal-inspiral/bin/gstlal_inspiral_lvalert_pastro_rate_posterior b/gstlal-inspiral/bin/gstlal_inspiral_lvalert_pastro_rate_posterior index 8a1efa41f0..95514988f0 100755 --- a/gstlal-inspiral/bin/gstlal_inspiral_lvalert_pastro_rate_posterior +++ b/gstlal-inspiral/bin/gstlal_inspiral_lvalert_pastro_rate_posterior @@ -61,6 +61,7 @@ from glue.text_progress_bar import ProgressBar from lalinspiral import thinca from gstlal import lvalert_helper +from gstlal.plotutil import golden_ratio from ligo.gracedb import rest as gracedb import bisect @@ -88,8 +89,6 @@ matplotlib.rcParams.update({ "path.simplify": True }) -golden_ratio = (1. + math.sqrt(5.)) / 2. - # # ============================================================================= # diff --git a/gstlal-inspiral/bin/gstlal_inspiral_plot_banks b/gstlal-inspiral/bin/gstlal_inspiral_plot_banks index c00c229ce1..3d1d0e4bb2 100755 --- a/gstlal-inspiral/bin/gstlal_inspiral_plot_banks +++ b/gstlal-inspiral/bin/gstlal_inspiral_plot_banks @@ -26,7 +26,6 @@ # ============================================================================= # -import math import matplotlib import matplotlib.figure matplotlib.rcParams.update({ @@ -57,8 +56,7 @@ from glue.lal import CacheEntry from gstlal import svd_bank from gstlal import inspiral_pipe - -golden_ratio = (1. + math.sqrt(5.)) / 2. +from gstlal.plotutil import golden_ratio # # ============================================================================= diff --git a/gstlal-inspiral/bin/gstlal_inspiral_plotsummary b/gstlal-inspiral/bin/gstlal_inspiral_plotsummary index 0d9e1560c6..cc9887789a 100755 --- a/gstlal-inspiral/bin/gstlal_inspiral_plotsummary +++ b/gstlal-inspiral/bin/gstlal_inspiral_plotsummary @@ -65,9 +65,7 @@ from glue.ligolw.utils import segments as ligolw_segments from gstlal import far from gstlal import inspiral_pipe from gstlal import gviz_api - - -golden_ratio = (1. + math.sqrt(5.)) / 2. +from gstlal.plotutil import golden_ratio def to_google_json(fname, description, data): diff --git a/gstlal-inspiral/bin/gstlal_inspiral_rate_posterior b/gstlal-inspiral/bin/gstlal_inspiral_rate_posterior index d769fcc8d2..a0d58ed767 100755 --- a/gstlal-inspiral/bin/gstlal_inspiral_rate_posterior +++ b/gstlal-inspiral/bin/gstlal_inspiral_rate_posterior @@ -34,7 +34,6 @@ try: except ImportError: NegInf = float("-inf") import h5py -import math import matplotlib matplotlib.rcParams.update({ "font.size": 8.0, @@ -68,9 +67,7 @@ from lalinspiral import thinca from gstlal import far from gstlal import rate_estimation - - -golden_ratio = (1. + math.sqrt(5.)) / 2. +from gstlal.plotutil import golden_ratio process_name = u"gstlal_inspiral_rate_posterior" -- GitLab