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
15db7783
Commit
15db7783
authored
6 years ago
by
Colm Talbot
Browse files
Options
Downloads
Patches
Plain Diff
change input parameters of samples_to_data_frame
parent
58aaf23f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!31
Change sampled parameters
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tupak/result.py
+8
-6
8 additions, 6 deletions
tupak/result.py
with
8 additions
and
6 deletions
tupak/result.py
+
8
−
6
View file @
15db7783
...
...
@@ -205,21 +205,23 @@ class Result(dict):
for
key
in
self
.
prior
:
prior_file
.
write
(
self
.
prior
[
key
])
def
samples_to_data_frame
(
self
,
waveform_generator
=
None
,
interferometers
=
None
,
priors
=
None
):
def
samples_to_data_frame
(
self
,
likelihood
=
None
,
priors
=
None
,
conversion_function
=
None
):
"""
Convert array of samples to data frame.
Parameters
----------
waveform_generator: tupak.waveform_generator.WaveformGenerator, optional
If the waveform generator and interferometers are provided, the SNRs will be recorded.
interferometers: tupak.detector.Interferometer
If the waveform generator and interferometers are provided, the SNRs will be recorded.
likelihood: tupak.likelihood.Likelihood
Likelihood used for sampling.
priors: dict
Dictionary of prior object, used to fill in delta function priors.
conversion_function: function
Function which adds in extra parameters to the data frame,
should take the data_frame, likelihood and prior as arguments.
"""
data_frame
=
pd
.
DataFrame
(
self
.
samples
,
columns
=
self
.
search_parameter_keys
)
tupak
.
conversion
.
generate_all_bbh_parameters
(
data_frame
,
waveform_generator
,
interferometers
,
priors
)
if
conversion_function
is
not
None
:
conversion_function
(
data_frame
,
likelihood
,
priors
)
self
.
posterior
=
data_frame
def
construct_cbc_derived_parameters
(
self
):
...
...
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