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
170a97a5
Commit
170a97a5
authored
6 years ago
by
Gregory Ashton
Browse files
Options
Downloads
Plain Diff
Merge branch 'gracedb-reading-example' into 'master'
Add GraceDB reading example See merge request
lscsoft/bilby!334
parents
f9d9114d
c6ddc084
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!334
Add GraceDB reading example
Pipeline
#45584
passed
6 years ago
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/open_data_examples/read_gracedb_data.py
+48
-0
48 additions, 0 deletions
examples/open_data_examples/read_gracedb_data.py
with
48 additions
and
0 deletions
examples/open_data_examples/read_gracedb_data.py
0 → 100644
+
48
−
0
View file @
170a97a5
#!/usr/bin/env python
"""
Tutorial to demonstrates reading and plotting the GraceDB data for GW170608,
the lightest GWTC-1 BBH event.
This tutorial must be run on a LIGO cluster.
"""
import
bilby
label
=
'
GW170608
'
outdir
=
label
+
'
_out
'
# List of detectors involved in the event. GW170608 is pre-August 2017 so only
# H1 and L1 were involved
detectors
=
[
'
H1
'
,
'
L1
'
]
# Names of the channels and query types to use, and the event GraceDB ID - ref.
# https://ldas-jobs.ligo.caltech.edu/~eve.chase/monitor/online_pe/C02_clean/
# C02_HL_Pv2/lalinferencenest/IMRPhenomPv2pseudoFourPN/config.ini
channel_names
=
[
'
H1:DCH-CLEAN_STRAIN_C02
'
,
'
L1:DCH-CLEAN_STRAIN_C02
'
]
query_types
=
[
'
H1_CLEANED_HOFT_C02
'
,
'
L1_CLEANED_HOFT_C02
'
]
gracedb
=
'
G288686
'
# Calibration number to inform bilby's guess of query type if those provided are
# not recognised
calibration
=
2
# Duration of data around the event to use
duration
=
16
# Duration of PSD data
psd_duration
=
1024
# Time of event, stored in bilby
trigger_time
=
bilby
.
gw
.
utils
.
get_event_time
(
label
)
# Minimum frequency and reference frequency
minimum_frequency
=
10
# Hz
# Get frame caches
candidate
,
frame_caches
=
bilby
.
gw
.
utils
.
get_gracedb
(
gracedb
,
outdir
,
duration
,
calibration
,
detectors
,
query_types
)
# Set up interferometer objects from the cache files
interferometers
=
bilby
.
gw
.
detector
.
InterferometerList
([])
for
cache_file
,
channel_name
in
zip
(
frame_caches
,
channel_names
):
interferometer
=
bilby
.
gw
.
detector
.
load_data_from_cache_file
(
cache_file
,
trigger_time
,
duration
,
psd_duration
,
channel_name
)
interferometer
.
minimum_frequency
=
minimum_frequency
interferometers
.
append
(
interferometer
)
# Plot the strain data
interferometers
.
plot_data
(
outdir
=
outdir
,
label
=
label
)
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