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
50c2cd63
Commit
50c2cd63
authored
2 years ago
by
Sylvia Biscoveanu
Committed by
Colm Talbot
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
BUGFIX: Update frame reading utility
parent
d5580325
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1202
BUGFIX: Update frame reading utility
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bilby/gw/utils.py
+5
-1
5 additions, 1 deletion
bilby/gw/utils.py
with
5 additions
and
1 deletion
bilby/gw/utils.py
+
5
−
1
View file @
50c2cd63
...
...
@@ -362,7 +362,7 @@ def get_open_strain_data(
return
strain
def
read_frame_file
(
file_name
,
start_time
,
end_time
,
channel
=
None
,
buffer_time
=
0
,
**
kwargs
):
def
read_frame_file
(
file_name
,
start_time
,
end_time
,
resample
=
None
,
channel
=
None
,
buffer_time
=
0
,
**
kwargs
):
"""
A function which accesses the open strain data
This uses `gwpy` to download the open data and then saves a cached copy for
...
...
@@ -379,6 +379,8 @@ def read_frame_file(file_name, start_time, end_time, channel=None, buffer_time=0
channel: str
The name of the channel being searched for, some standard channel names are attempted
if channel is not specified or if specified channel is not found.
resample: float
The sampling frequency to use for the TimeSeries in Hz
**kwargs:
Passed to `gwpy.timeseries.TimeSeries.fetch_open_data`
...
...
@@ -420,6 +422,8 @@ def read_frame_file(file_name, start_time, end_time, channel=None, buffer_time=0
pass
if
loaded
:
if
resample
and
(
strain
.
sample_rate
.
value
!=
resample
):
strain
.
resample
(
resample
)
return
strain
else
:
logger
.
warning
(
'
No data loaded.
'
)
...
...
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