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
1fc5c569
Commit
1fc5c569
authored
6 years ago
by
Colm Talbot
Browse files
Options
Downloads
Patches
Plain Diff
make luminostiy distance test run
parent
bd270261
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!125
Rework ci
Pipeline
#26747
passed
6 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/other_tests.py
+8
-4
8 additions, 4 deletions
test/other_tests.py
with
8 additions
and
4 deletions
test/other_tests.py
+
8
−
4
View file @
1fc5c569
...
...
@@ -44,8 +44,11 @@ class Test(unittest.TestCase):
self
.
dir_path
+
'
/test/standard_data.txt
'
).
T
hf_signal_and_noise_saved
=
hf_real_saved
+
1j
*
hf_imag_saved
self
.
assertTrue
(
np
.
array_equal
(
self
.
msd
[
'
frequencies
'
],
frequencies_saved
))
self
.
assertAlmostEqual
(
all
(
self
.
msd
[
'
hf_signal_and_noise
'
]
-
hf_signal_and_noise_saved
),
0.00000000
,
5
)
self
.
assertTrue
(
np
.
array_equal
(
self
.
msd
[
'
frequencies
'
],
frequencies_saved
))
self
.
assertAlmostEqual
(
all
(
self
.
msd
[
'
hf_signal_and_noise
'
]
-
hf_signal_and_noise_saved
),
0.00000000
,
5
)
def
test_recover_luminosity_distance
(
self
):
likelihood
=
tupak
.
gw
.
likelihood
.
GravitationalWaveTransient
(
...
...
@@ -61,8 +64,9 @@ class Test(unittest.TestCase):
result
=
tupak
.
core
.
sampler
.
run_sampler
(
likelihood
,
priors
,
sampler
=
'
dynesty
'
,
verbose
=
False
,
npoints
=
100
)
self
.
assertAlmostEqual
(
np
.
mean
(
result
.
samples
),
dL
,
delta
=
3
*
np
.
std
(
result
.
samples
))
self
.
assertAlmostEqual
(
np
.
mean
(
result
.
posterior
.
luminosity_distance
),
dL
,
delta
=
3
*
np
.
std
(
result
.
posterior
.
luminosity_distance
))
if
__name__
==
'
__main__
'
:
...
...
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