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
a2b43c6f
Commit
a2b43c6f
authored
6 years ago
by
Colm Talbot
Browse files
Options
Downloads
Patches
Plain Diff
cosmetic changes to make custom source run faster
parent
5564a3f2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!42
Add uniform in log prior
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/injection_examples/create_your_own_source_model.py
+4
-5
4 additions, 5 deletions
examples/injection_examples/create_your_own_source_model.py
with
4 additions
and
5 deletions
examples/injection_examples/create_your_own_source_model.py
+
4
−
5
View file @
a2b43c6f
...
@@ -24,7 +24,7 @@ def sine_gaussian(f, A, f0, tau, phi0, geocent_time, ra, dec, psi):
...
@@ -24,7 +24,7 @@ def sine_gaussian(f, A, f0, tau, phi0, geocent_time, ra, dec, psi):
# We now define some parameters that we will inject and then a waveform generator
# We now define some parameters that we will inject and then a waveform generator
injection_parameters
=
dict
(
A
=
1e-2
1
,
f0
=
10
,
tau
=
1
,
phi0
=
0
,
geocent_time
=
0
,
injection_parameters
=
dict
(
A
=
1e-2
3
,
f0
=
10
0
,
tau
=
1
,
phi0
=
0
,
geocent_time
=
0
,
ra
=
0
,
dec
=
0
,
psi
=
0
)
ra
=
0
,
dec
=
0
,
psi
=
0
)
waveform_generator
=
tupak
.
waveform_generator
.
WaveformGenerator
(
time_duration
=
time_duration
,
waveform_generator
=
tupak
.
waveform_generator
.
WaveformGenerator
(
time_duration
=
time_duration
,
sampling_frequency
=
sampling_frequency
,
sampling_frequency
=
sampling_frequency
,
...
@@ -42,15 +42,14 @@ IFOs = [tupak.detector.get_interferometer_with_fake_noise_and_injection(
...
@@ -42,15 +42,14 @@ IFOs = [tupak.detector.get_interferometer_with_fake_noise_and_injection(
# Here we define the priors for the search. We use the injection parameters
# Here we define the priors for the search. We use the injection parameters
# except for the amplitude, f0, and geocent_time
# except for the amplitude, f0, and geocent_time
prior
=
injection_parameters
.
copy
()
prior
=
injection_parameters
.
copy
()
prior
[
'
A
'
]
=
tupak
.
prior
.
Uniform
(
0
,
1e-20
,
'
A
'
)
prior
[
'
A
'
]
=
tupak
.
prior
.
PowerLaw
(
alpha
=-
1
,
minimum
=
1e-25
,
maximum
=
1e-21
,
name
=
'
A
'
)
prior
[
'
f0
'
]
=
tupak
.
prior
.
Uniform
(
0
,
20
,
'
f
'
)
prior
[
'
f0
'
]
=
tupak
.
prior
.
Uniform
(
90
,
110
,
'
f
'
)
prior
[
'
geocent_time
'
]
=
tupak
.
prior
.
Uniform
(
-
0.01
,
0.01
,
'
geocent_time
'
)
likelihood
=
tupak
.
likelihood
.
GravitationalWaveTransient
(
IFOs
,
waveform_generator
)
likelihood
=
tupak
.
likelihood
.
GravitationalWaveTransient
(
IFOs
,
waveform_generator
)
result
=
tupak
.
sampler
.
run_sampler
(
result
=
tupak
.
sampler
.
run_sampler
(
likelihood
,
prior
,
sampler
=
'
dynesty
'
,
outdir
=
outdir
,
label
=
label
,
likelihood
,
prior
,
sampler
=
'
dynesty
'
,
outdir
=
outdir
,
label
=
label
,
resume
=
False
,
sample
=
'
unif
'
)
resume
=
False
,
sample
=
'
unif
'
,
injection_parameters
=
injection_parameters
)
result
.
plot_walks
()
result
.
plot_walks
()
result
.
plot_distributions
()
result
.
plot_distributions
()
result
.
plot_corner
()
result
.
plot_corner
()
...
...
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