Commit d28f2611 authored by James Clark's avatar James Clark
Browse files

Merge branch 'megaplot-4ifo' into 'master'

Megaplot for more than 3 IFOs

See merge request !186
parents 485d9e5e 389dc5ac
Pipeline #159280 passed with stages
in 2 minutes and 1 second
...@@ -92,8 +92,8 @@ htmlDir = 'html/' ...@@ -92,8 +92,8 @@ htmlDir = 'html/'
#### --fullOnly ### #### --fullOnly ###
fullOnly_flag = 0 fullOnly_flag = 0
if os.path.exists(postDir+'full'): if os.path.exists(postDir+'full'):
fullOnly_flag = 1 fullOnly_flag = 1
print("Found --fullOnly flag\n") print("Found --fullOnly flag\n")
#Adopt common color scheme for different models #Adopt common color scheme for different models
...@@ -102,6 +102,7 @@ gcolor = 'darkgoldenrod' ...@@ -102,6 +102,7 @@ gcolor = 'darkgoldenrod'
scolor = 'darkorchid' scolor = 'darkorchid'
ifoColors = ['darkgoldenrod','darkkhaki','darkseagreen','olive','cadetblue','green','slategray','darkcyan'] ifoColors = ['darkgoldenrod','darkkhaki','darkseagreen','olive','cadetblue','green','slategray','darkcyan']
signal_ifoColorList = ['darkorchid','fuchsia','indigo','orchid','slateblue','mediumvioletred','palevioletred']
injcolor = 'teal' injcolor = 'teal'
...@@ -852,7 +853,7 @@ def plot_likelihood_2(modelList, plotsDir, fullOnly_flag=0): ...@@ -852,7 +853,7 @@ def plot_likelihood_2(modelList, plotsDir, fullOnly_flag=0):
def plot_model_dims(modelList, ifoList, ifoNames, plotsDir, fullOnly_flag=0): def plot_model_dims(modelList, ifoList, ifoNames, plotsDir, fullOnly_flag=0):
lineStyles = ['-', '--', ':'] lineStyles = ['-', '--', ':','-','--',':']
lineColors = ifoColors lineColors = ifoColors
glitchChains = [] glitchChains = []
signalChains = [] signalChains = []
...@@ -1034,13 +1035,14 @@ def plot_model_dims(modelList, ifoList, ifoNames, plotsDir, fullOnly_flag=0): ...@@ -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): def whitened_residual_plots(model,ifoList,ifoNames,fullOnly_flag=0):
if model == 'glitch': if model == 'glitch':
colour = gcolor lineColors = ifoColors
elif model == 'signal': elif model == 'signal':
colour = scolor lineColors = signal_ifoColorList
elif model == 'noise': elif model == 'noise':
colour = ncolor colour = ncolor
lineColors = ifoColors
hashlist = ['solid','dashed','dashdot'] hashlist = ['solid','dashed','dashdot','solid','dashed','dashdot']
plt.clf() plt.clf()
...@@ -1081,7 +1083,7 @@ def whitened_residual_plots(model,ifoList,ifoNames,fullOnly_flag=0): ...@@ -1081,7 +1083,7 @@ def whitened_residual_plots(model,ifoList,ifoNames,fullOnly_flag=0):
#### --- Histograms #### --- Histograms
plt.plot(x,scs.norm.pdf(x, mu, sigma),color='k',lw=1.4,label='$\mathcal{N}[0,1]$') plt.plot(x,scs.norm.pdf(x, mu, sigma),color='k',lw=1.4,label='$\mathcal{N}[0,1]$')
for ifo in ifoList: 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.title(model)
plt.yscale('log') plt.yscale('log')
...@@ -1098,7 +1100,7 @@ def whitened_residual_plots(model,ifoList,ifoNames,fullOnly_flag=0): ...@@ -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]$') plt.plot(x,cdf,color='k',lw=1.4,label='$\mathcal{N}[0,1]$')
for ifo in ifoList: 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.title(model)
plt.yscale('log') 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