Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bilby
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lscsoft
bilby
Commits
84f35d58
Commit
84f35d58
authored
4 years ago
by
Moritz Huebner
Browse files
Options
Downloads
Plain Diff
Merge branch '536-plot_waveform_posterior-uses-non-representative-samples' into 'master'
Resolve "plot_waveform_posterior uses non representative samples" Closes
#536
See merge request
!894
parents
b3865308
6100eae9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!894
Resolve "plot_waveform_posterior uses non representative samples"
Pipeline
#182170
passed
4 years ago
Stage: test
Stage: deploy
Changes
1
Pipelines
21
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bilby/gw/result.py
+8
-6
8 additions, 6 deletions
bilby/gw/result.py
with
8 additions
and
6 deletions
bilby/gw/result.py
+
8
−
6
View file @
84f35d58
...
...
@@ -337,7 +337,7 @@ class CompactBinaryCoalescenceResult(CoreResult):
interferometer
.
name
))
if
n_samples
is
None
:
n_
samples
=
len
(
self
.
posterior
)
samples
=
self
.
posterior
elif
n_samples
>
len
(
self
.
posterior
):
logger
.
debug
(
"
Requested more waveform samples ({}) than we have
"
...
...
@@ -345,14 +345,16 @@ class CompactBinaryCoalescenceResult(CoreResult):
n_samples
,
len
(
self
.
posterior
)
)
)
n_samples
=
len
(
self
.
posterior
)
samples
=
self
.
posterior
else
:
samples
=
self
.
posterior
.
sample
(
n_samples
,
replace
=
False
)
if
start_time
is
None
:
start_time
=
-
0.4
start_time
=
np
.
mean
(
s
elf
.
posterior
.
geocent_time
)
+
start_time
start_time
=
np
.
mean
(
s
amples
.
geocent_time
)
+
start_time
if
end_time
is
None
:
end_time
=
0.2
end_time
=
np
.
mean
(
s
elf
.
posterior
.
geocent_time
)
+
end_time
end_time
=
np
.
mean
(
s
amples
.
geocent_time
)
+
end_time
if
format
==
"
html
"
:
start_time
=
-
np
.
inf
end_time
=
np
.
inf
...
...
@@ -470,8 +472,8 @@ class CompactBinaryCoalescenceResult(CoreResult):
fd_waveforms
=
list
()
td_waveforms
=
list
()
for
ii
in
range
(
n_samples
):
params
=
dict
(
self
.
posterior
.
iloc
[
ii
]
)
for
_
,
params
in
samples
.
iterrows
(
):
params
=
dict
(
params
)
wf_pols
=
waveform_generator
.
frequency_domain_strain
(
params
)
fd_waveform
=
interferometer
.
get_detector_response
(
wf_pols
,
params
)
fd_waveforms
.
append
(
fd_waveform
[
frequency_idxs
])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment