Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
bilby
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
19
Issues
19
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
Container Registry
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lscsoft
bilby
Commits
7c9d2080
Commit
7c9d2080
authored
Jul 29, 2019
by
Gregory Ashton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes the default number of walks to 30x ndim (previously 10x ndims).
parent
961875ca
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
CHANGELOG.md
CHANGELOG.md
+3
-1
bilby/core/sampler/dynesty.py
bilby/core/sampler/dynesty.py
+2
-2
test/sampler_test.py
test/sampler_test.py
+4
-6
No files found.
CHANGELOG.md
View file @
7c9d2080
...
...
@@ -5,7 +5,9 @@
### Added
-
### Changed
-
-
Dynesty default settings changed: by default, now uses 30xndim walks. This was
shown (!564) to provide better convergence for the long-duration high-spin tests.
### Removed
-
...
...
bilby/core/sampler/dynesty.py
View file @
7c9d2080
...
...
@@ -55,7 +55,7 @@ class Dynesty(NestedSampler):
Method used to sample uniformly within the likelihood constraints,
conditioned on the provided bounds
walks: int
Number of walks taken if using `sample='rwalk'`, defaults to `ndim *
5
`
Number of walks taken if using `sample='rwalk'`, defaults to `ndim *
30
`
dlogz: float, (0.1)
Stopping criteria
verbose: Bool
...
...
@@ -156,7 +156,7 @@ class Dynesty(NestedSampler):
def
_verify_kwargs_against_default_kwargs
(
self
):
if
not
self
.
kwargs
[
'walks'
]:
self
.
kwargs
[
'walks'
]
=
self
.
ndim
*
1
0
self
.
kwargs
[
'walks'
]
=
self
.
ndim
*
3
0
if
not
self
.
kwargs
[
'update_interval'
]:
self
.
kwargs
[
'update_interval'
]
=
int
(
0.6
*
self
.
kwargs
[
'nlive'
])
if
not
self
.
kwargs
[
'print_func'
]:
...
...
test/sampler_test.py
View file @
7c9d2080
...
...
@@ -5,7 +5,6 @@ import unittest
from
mock
import
MagicMock
import
numpy
as
np
import
os
import
sys
import
shutil
import
copy
...
...
@@ -154,14 +153,13 @@ class TestDynesty(unittest.TestCase):
enlarge
=
None
,
bootstrap
=
None
,
vol_dec
=
0.5
,
vol_check
=
2.0
,
facc
=
0.5
,
slices
=
5
,
dlogz
=
0.1
,
maxiter
=
None
,
maxcall
=
None
,
logl_max
=
np
.
inf
,
add_live
=
True
,
print_progress
=
True
,
save_bounds
=
False
,
walks
=
2
0
,
update_interval
=
600
,
print_func
=
'func'
)
walks
=
6
0
,
update_interval
=
600
,
print_func
=
'func'
)
self
.
sampler
.
kwargs
[
'print_func'
]
=
'func'
# set this manually as this is not testable otherwise
self
.
assertListEqual
([
0
,
1
],
self
.
sampler
.
kwargs
[
'periodic'
])
# Check this separately
self
.
sampler
.
kwargs
[
'periodic'
]
=
None
# The dict comparison can't handle lists
for
key
in
self
.
sampler
.
kwargs
.
keys
():
print
(
key
)
print
(
expected
[
key
])
print
(
self
.
sampler
.
kwargs
[
key
])
print
(
"key={}, expected={}, actual={}"
.
format
(
key
,
expected
[
key
],
self
.
sampler
.
kwargs
[
key
]))
self
.
assertDictEqual
(
expected
,
self
.
sampler
.
kwargs
)
def
test_translate_kwargs
(
self
):
...
...
@@ -173,7 +171,7 @@ class TestDynesty(unittest.TestCase):
enlarge
=
None
,
bootstrap
=
None
,
vol_dec
=
0.5
,
vol_check
=
2.0
,
facc
=
0.5
,
slices
=
5
,
dlogz
=
0.1
,
maxiter
=
None
,
maxcall
=
None
,
logl_max
=
np
.
inf
,
add_live
=
True
,
print_progress
=
True
,
save_bounds
=
False
,
walks
=
2
0
,
update_interval
=
600
,
print_func
=
'func'
)
walks
=
6
0
,
update_interval
=
600
,
print_func
=
'func'
)
for
equiv
in
bilby
.
core
.
sampler
.
base_sampler
.
NestedSampler
.
npoints_equiv_kwargs
:
new_kwargs
=
self
.
sampler
.
kwargs
.
copy
()
...
...
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