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
caac3d80
There was a problem fetching the pipeline summary.
Commit
caac3d80
authored
6 years ago
by
Gregory Ashton
Browse files
Options
Downloads
Patches
Plain Diff
Adds methods to set from a CSV file
parent
3f578976
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!94
Add functionality to strain data
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tupak/gw/detector.py
+25
-1
25 additions, 1 deletion
tupak/gw/detector.py
with
25 additions
and
1 deletion
tupak/gw/detector.py
+
25
−
1
View file @
caac3d80
...
@@ -408,7 +408,7 @@ class InterferometerStrainData(object):
...
@@ -408,7 +408,7 @@ class InterferometerStrainData(object):
def
set_from_open_data
(
def
set_from_open_data
(
self
,
name
,
start_time
,
duration
=
4
,
outdir
=
'
outdir
'
,
cache
=
True
,
self
,
name
,
start_time
,
duration
=
4
,
outdir
=
'
outdir
'
,
cache
=
True
,
**
kwargs
):
**
kwargs
):
"""
Set the strain data from
a
open LOSC data
"""
Set the strain data from open LOSC data
This sets the time_domain_strain attribute, the frequency_domain_strain
This sets the time_domain_strain attribute, the frequency_domain_strain
is automatically calculated after a low-pass filter and Tukey window
is automatically calculated after a low-pass filter and Tukey window
...
@@ -439,6 +439,19 @@ class InterferometerStrainData(object):
...
@@ -439,6 +439,19 @@ class InterferometerStrainData(object):
self
.
set_from_gwpy_timeseries
(
timeseries
)
self
.
set_from_gwpy_timeseries
(
timeseries
)
self
.
_check_maximum_frequency
()
self
.
_check_maximum_frequency
()
def
set_from_csv
(
self
,
filename
):
"""
Set the strain data from a csv file
Parameters
----------
filename: str
The path to the file to read in
"""
timeseries
=
gwpy
.
timeseries
.
TimeSeries
.
read
(
filename
,
format
=
'
csv
'
)
self
.
set_from_gwpy_timeseries
(
timeseries
)
self
.
_check_maximum_frequency
()
def
_infer_frequency_domain_dependence
(
def
_infer_frequency_domain_dependence
(
self
,
sampling_frequency
,
duration
,
frequency_array
):
self
,
sampling_frequency
,
duration
,
frequency_array
):
"""
Helper function to figure out if the frequency_array, or
"""
Helper function to figure out if the frequency_array, or
...
@@ -745,6 +758,17 @@ class Interferometer(object):
...
@@ -745,6 +758,17 @@ class Interferometer(object):
duration
=
duration
,
start_time
=
start_time
,
duration
=
duration
,
start_time
=
start_time
,
channel_name
=
channel_name
,
buffer_time
=
buffer_time
)
channel_name
=
channel_name
,
buffer_time
=
buffer_time
)
def
set_strain_data_from_csv
(
self
,
filename
):
"""
Set the `Interferometer.strain_data` from a csv file
Parameters
----------
filename: str
The path to the file to read in
"""
self
.
strain_data
.
set_from_csv
(
filename
)
def
set_strain_data_from_zero_noise
(
def
set_strain_data_from_zero_noise
(
self
,
sampling_frequency
,
duration
,
start_time
=
0
):
self
,
sampling_frequency
,
duration
,
start_time
=
0
):
"""
Set the `Interferometer.strain_data` to zero noise
"""
Set the `Interferometer.strain_data` to zero noise
...
...
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