Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bilby
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Sylvia Biscoveanu
bilby
Commits
5835de2b
Commit
5835de2b
authored
6 years ago
by
Gregory Ashton
Browse files
Options
Downloads
Patches
Plain Diff
Add basic set from gwpy method
parent
b9636986
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tupak/gw/detector.py
+10
-0
10 additions, 0 deletions
tupak/gw/detector.py
with
10 additions
and
0 deletions
tupak/gw/detector.py
+
10
−
0
View file @
5835de2b
...
...
@@ -5,6 +5,7 @@ import os
import
matplotlib.pyplot
as
plt
import
numpy
as
np
import
gwpy
from
gwpy.signal
import
filter_design
from
scipy
import
signal
from
scipy.interpolate
import
interp1d
...
...
@@ -258,6 +259,15 @@ class InterferometerStrainData(object):
raise
ValueError
(
"
Insufficient information given to set time_array
"
)
def
set_from_gwpy_timeseries
(
self
,
timeseries
):
logging
.
debug
(
'
Setting data using provided gwpy TimeSeries object
'
)
if
type
(
timeseries
)
!=
gwpy
.
timeseries
.
timeseries
.
TimeSeries
:
raise
ValueError
(
"
Input timeseries is not a gwpy TimeSeries
"
)
self
.
start_time
=
timeseries
.
epoch
.
value
self
.
sampling_frequency
=
timeseries
.
sample_rate
.
value
self
.
duration
=
timeseries
.
value
self
.
time_domain_strain
=
timeseries
.
value
def
set_from_time_domain_strain
(
self
,
time_domain_strain
,
sampling_frequency
=
None
,
duration
=
None
,
start_time
=
0
,
time_array
=
None
):
...
...
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