Commit ecf8d57c authored by Meg Millhouse's avatar Meg Millhouse

Fix residual plots to handle more than 3 IFOs

parent 6b4a9bf8
......@@ -102,6 +102,7 @@ gcolor = 'darkgoldenrod'
scolor = 'darkorchid'
ifoColors = ['darkgoldenrod','darkkhaki','darkseagreen','olive','cadetblue','green','slategray','darkcyan']
signal_ifoColorList = ['darkorchid','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 = []
......@@ -1040,7 +1041,8 @@ def whitened_residual_plots(model,ifoList,ifoNames,fullOnly_flag=0):
elif model == 'noise':
colour = ncolor
hashlist = ['solid','dashed','dashdot']
lineColors = ifoColors
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')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment