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
195aac95
Commit
195aac95
authored
6 years ago
by
Colm Talbot
Browse files
Options
Downloads
Patches
Plain Diff
pep
parent
7a033493
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!228
Update examples
Pipeline
#33256
failed
6 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/injection_examples/australian_detector.py
+15
-9
15 additions, 9 deletions
examples/injection_examples/australian_detector.py
with
15 additions
and
9 deletions
examples/injection_examples/australian_detector.py
+
15
−
9
View file @
195aac95
...
...
@@ -9,9 +9,11 @@ from __future__ import division, print_function
import
numpy
as
np
import
bilby
,
gwinc
import
bilby
import
gwinc
# Set the duration and sampling frequency of the data segment that we're going to inject the signal into
# Set the duration and sampling frequency of the data segment that we're going
# to inject the signal into
duration
=
4.
sampling_frequency
=
2048.
...
...
@@ -44,8 +46,9 @@ AusIFO = bilby.gw.detector.Interferometer(
# Set up two other detectors at Hanford and Livingston
interferometers
=
bilby
.
gw
.
detector
.
InterferometerList
([
'
H1
'
,
'
L1
'
])
for
interferometer
in
interferometers
:
interferometer
.
power_spectral_density
=
bilby
.
gw
.
detector
.
PowerSpectralDensity
(
frequency_array
=
frequencies
,
psd_array
=
Aplus_psd
)
interferometer
.
power_spectral_density
=
\
bilby
.
gw
.
detector
.
PowerSpectralDensity
(
frequency_array
=
frequencies
,
psd_array
=
Aplus_psd
)
# append the Australian detector to the list of other detectors
interferometers
.
append
(
AusIFO
)
...
...
@@ -54,9 +57,10 @@ interferometers.append(AusIFO)
# Inject a gravitational-wave signal into the network
# as we're using a three-detector network of A+, we inject a GW150914-like
# signal at 4 Gpc
injection_parameters
=
dict
(
mass_1
=
36.
,
mass_2
=
29.
,
a_1
=
0.4
,
a_2
=
0.3
,
tilt_1
=
0.5
,
tilt_2
=
1.0
,
phi_12
=
1.7
,
phi_jl
=
0.3
,
luminosity_distance
=
4000.
,
iota
=
0.4
,
psi
=
2.659
,
phase
=
1.3
,
geocent_time
=
1126259642.413
,
ra
=
1.375
,
dec
=
0.2108
)
injection_parameters
=
dict
(
mass_1
=
36.
,
mass_2
=
29.
,
a_1
=
0.4
,
a_2
=
0.3
,
tilt_1
=
0.5
,
tilt_2
=
1.0
,
phi_12
=
1.7
,
phi_jl
=
0.3
,
luminosity_distance
=
4000.
,
iota
=
0.4
,
psi
=
2.659
,
phase
=
1.3
,
geocent_time
=
1126259642.413
,
ra
=
1.375
,
dec
=
0.2108
)
# Fixed arguments passed into the source model
...
...
@@ -86,10 +90,12 @@ for interferometer in interferometers:
# set up priors
priors
=
bilby
.
gw
.
prior
.
BBHPriorSet
()
for
key
in
[
'
a_1
'
,
'
a_2
'
,
'
tilt_1
'
,
'
tilt_2
'
,
'
phi_12
'
,
'
phi_jl
'
,
'
psi
'
,
'
geocent_time
'
,
'
phase
'
]:
for
key
in
[
'
a_1
'
,
'
a_2
'
,
'
tilt_1
'
,
'
tilt_2
'
,
'
phi_12
'
,
'
phi_jl
'
,
'
psi
'
,
'
geocent_time
'
,
'
phase
'
]:
priors
[
key
]
=
injection_parameters
[
key
]
# Initialise the likelihood by passing in the interferometer data (IFOs) and the waveoform generator
# Initialise the likelihood by passing in the interferometer data (IFOs)
# and the waveoform generator
likelihood
=
bilby
.
gw
.
GravitationalWaveTransient
(
interferometers
=
interferometers
,
waveform_generator
=
waveform_generator
,
time_marginalization
=
False
,
phase_marginalization
=
False
,
...
...
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