Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
lscsoft
bayeswave
Commits
ecf8d57c
Commit
ecf8d57c
authored
Aug 18, 2020
by
Meg Millhouse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix residual plots to handle more than 3 IFOs
parent
6b4a9bf8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
BayesWaveUtils/scripts/megaplot.py
BayesWaveUtils/scripts/megaplot.py
+6
-4
No files found.
BayesWaveUtils/scripts/megaplot.py
View file @
ecf8d57c
...
...
@@ -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'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment