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
d34369ac
Commit
d34369ac
authored
6 years ago
by
Colm Talbot
Browse files
Options
Downloads
Patches
Plain Diff
make test_redundancy an empty method of PriorSet
parent
c57fc5ee
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!59
Updating priors
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tupak/core/prior.py
+6
-4
6 additions, 4 deletions
tupak/core/prior.py
with
6 additions
and
4 deletions
tupak/core/prior.py
+
6
−
4
View file @
d34369ac
...
...
@@ -9,8 +9,6 @@ import scipy.stats
import
logging
import
os
from
tupak.gw.prior
import
test_redundancy
class
PriorSet
(
dict
):
def
__init__
(
self
,
dictionary
=
None
,
filename
=
None
):
...
...
@@ -117,11 +115,11 @@ class PriorSet(dict):
"
will not be sampled and may cause an error.
"
.
format
(
missing_key
,
set_val
))
else
:
if
not
test_redundancy
(
missing_key
,
self
):
if
not
self
.
test_redundancy
(
missing_key
):
self
[
missing_key
]
=
default_prior
for
key
in
self
:
test_redundancy
(
key
,
self
)
self
.
test_redundancy
(
key
)
def
sample
(
self
,
size
=
None
):
"""
Draw samples from the prior set
"""
...
...
@@ -136,6 +134,10 @@ class PriorSet(dict):
rescaled_sample
=
[
self
[
key
].
rescale
(
sample
)
for
key
,
sample
in
zip
(
keys
,
theta
)]
return
rescaled_sample
def
test_redundancy
(
self
,
key
):
"""
Empty redundancy test, should be overwritten
"""
return
False
def
create_default_prior
(
name
,
default_priors_file
=
None
):
"""
...
...
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