diff --git a/BayesWaveUtils/scripts/megaplot.py b/BayesWaveUtils/scripts/megaplot.py index af65e9c5b10d20c592831b95648961530b14671e..74ed56e7cf4db9fa24adf360701d02d4ba2ac58a 100755 --- a/BayesWaveUtils/scripts/megaplot.py +++ b/BayesWaveUtils/scripts/megaplot.py @@ -92,8 +92,8 @@ htmlDir = 'html/' #### --fullOnly ### fullOnly_flag = 0 if os.path.exists(postDir+'full'): - fullOnly_flag = 1 - print("Found --fullOnly flag\n") + fullOnly_flag = 1 + print("Found --fullOnly flag\n") #Adopt common color scheme for different models @@ -102,6 +102,7 @@ gcolor = 'darkgoldenrod' scolor = 'darkorchid' ifoColors = ['darkgoldenrod','darkkhaki','darkseagreen','olive','cadetblue','green','slategray','darkcyan'] +signal_ifoColorList = ['darkorchid','fuchsia','indigo','orchid','slateblue','mediumvioletred','palevioletred'] injcolor = 'teal' @@ -852,7 +853,7 @@ def plot_likelihood_2(modelList, plotsDir, fullOnly_flag=0): def plot_model_dims(modelList, ifoList, ifoNames, plotsDir, fullOnly_flag=0): - lineStyles = ['-', '--', ':'] + lineStyles = ['-', '--', ':','-','--',':'] lineColors = ifoColors glitchChains = [] signalChains = [] @@ -1034,13 +1035,14 @@ def plot_model_dims(modelList, ifoList, ifoNames, plotsDir, fullOnly_flag=0): def whitened_residual_plots(model,ifoList,ifoNames,fullOnly_flag=0): if model == 'glitch': - colour = gcolor + lineColors = ifoColors elif model == 'signal': - colour = scolor + lineColors = signal_ifoColorList elif model == 'noise': colour = ncolor + lineColors = ifoColors - hashlist = ['solid','dashed','dashdot'] + hashlist = ['solid','dashed','dashdot','solid','dashed','dashdot'] plt.clf() @@ -1081,7 +1083,7 @@ def whitened_residual_plots(model,ifoList,ifoNames,fullOnly_flag=0): #### --- Histograms plt.plot(x,scs.norm.pdf(x, mu, sigma),color='k',lw=1.4,label='$\mathcal{N}[0,1]$') for ifo in ifoList: - plt.hist(whitened[ifo][imin::],bins=50,normed=True,color=colour,label=ifoNames[int(ifo)],histtype='step',ls=hashlist[int(ifo)]) + plt.hist(whitened[ifo][imin::],bins=50,normed=True,color=lineColors[int(ifo)],label=ifoNames[int(ifo)],histtype='step') plt.title(model) plt.yscale('log') @@ -1098,7 +1100,7 @@ def whitened_residual_plots(model,ifoList,ifoNames,fullOnly_flag=0): plt.plot(x,cdf,color='k',lw=1.4,label='$\mathcal{N}[0,1]$') for ifo in ifoList: - plt.hist(whitened[ifo][imin::],bins=50,normed=True,color=colour,label=ifoNames[int(ifo)],histtype='step',ls=hashlist[int(ifo)],cumulative=-1) + plt.hist(whitened[ifo][imin::],bins=50,normed=True,color=lineColors[int(ifo)],label=ifoNames[int(ifo)],histtype='step',cumulative=-1) plt.title(model) plt.yscale('log')