Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
bilby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
27
Issues
27
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
12
Merge Requests
12
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lscsoft
bilby
Commits
facebc86
Commit
facebc86
authored
Jun 17, 2019
by
Paul Lasky
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'load-data-by-channel-name-example' into 'master'
Load data by channel name example See merge request
!524
parents
a407eb3c
1a4fa6a5
Pipeline
#67232
passed with stages
in 6 minutes and 49 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
+49
-0
examples/open_data_examples/read_data_from_channel_name.py
examples/open_data_examples/read_data_from_channel_name.py
+49
-0
No files found.
examples/open_data_examples/read_data_from_channel_name.py
0 → 100644
View file @
facebc86
#!/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'
]
gracedb
=
'G288686'
# Duration of data around the event to use
duration
=
16
# Duration of PSD data
psd_duration
=
1024
# Minimum frequency and reference frequency
minimum_frequency
=
10
# Hz
sampling_frequency
=
2048.
# Get trigger time
candidate
=
bilby
.
gw
.
utils
.
gracedb_to_json
(
gracedb
,
outdir
=
outdir
)
trigger_time
=
candidate
[
'gpstime'
]
gps_start_time
=
trigger_time
+
2.
-
duration
# Load the PSD data starting after the segment you want to analyze
psd_start_time
=
gps_start_time
+
duration
# Set up interferometer objects from the cache files
interferometers
=
bilby
.
gw
.
detector
.
InterferometerList
([])
for
channel_name
in
channel_names
:
interferometer
=
bilby
.
gw
.
detector
.
load_data_by_channel_name
(
start_time
=
gps_start_time
,
segment_duration
=
duration
,
psd_duration
=
psd_duration
,
psd_start_time
=
psd_start_time
,
channel_name
=
channel_name
,
sampling_frequency
=
sampling_frequency
,
outdir
=
outdir
)
interferometer
.
minimum_frequency
=
minimum_frequency
interferometers
.
append
(
interferometer
)
# Plot the strain data
interferometers
.
plot_data
(
outdir
=
outdir
,
label
=
label
)
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