From d873b15e10626e92b6c0624cbd22d171d7eff3e1 Mon Sep 17 00:00:00 2001 From: zhexingli Date: Tue, 17 Jan 2023 16:25:10 -0800 Subject: [PATCH] Updated plotting routine Added a smal conditional statement regarding whether there're planets detected and decide how to plot the multipanel plot based on that result. This removes the plotting bug when there's no signal detected by rvsearch. --- rvsearch/search.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rvsearch/search.py b/rvsearch/search.py index 8907bef..e91bf53 100644 --- a/rvsearch/search.py +++ b/rvsearch/search.py @@ -502,7 +502,10 @@ def run_search(self, fixed_threshold=None, outdir=None, mkoutdir=True, rvplot = orbit_plots.MultipanelPlot(self.post, saveplot=outdir + '/orbit_plot{}.pdf'.format( self.num_planets)) - multiplot_fig, ax_list = rvplot.plot_multipanel() + if self.num_planets == 0: + multiplot_fig, ax_list = rvplot.plot_multipanel(nophase=True) + else: + multiplot_fig, ax_list = rvplot.plot_multipanel() multiplot_fig.savefig(outdir+'/orbit_plot{}.pdf'.format( self.num_planets))