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
bbd379b8
Commit
bbd379b8
authored
6 years ago
by
Colm Talbot
Browse files
Options
Downloads
Patches
Plain Diff
make asd and psd properties
parent
d6344284
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!79
Fix psd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tupak/gw/detector.py
+26
-2
26 additions, 2 deletions
tupak/gw/detector.py
with
26 additions
and
2 deletions
tupak/gw/detector.py
+
26
−
2
View file @
bbd379b8
...
...
@@ -629,10 +629,11 @@ class PowerSpectralDensity:
power_spectral_density_interpolated: scipy.interpolated.interp1d
Interpolated function of the PSD
"""
self
.
__both_updated
=
True
self
.
__power_spectral_density
=
[]
self
.
__amplitude_spectral_density
=
[]
self
.
frequencies
=
[]
self
.
power_spectral_density
=
[]
self
.
amplitude_spectral_density
=
[]
self
.
power_spectral_density_interpolated
=
None
if
asd_file
is
not
None
:
...
...
@@ -679,6 +680,29 @@ class PowerSpectralDensity:
min
(
self
.
power_spectral_density
)))
logging
.
warning
(
"
You may have intended to provide this as an amplitude spectral density.
"
)
@property
def
power_spectral_density
(
self
):
return
self
.
__power_spectral_density
@power_spectral_density.setter
def
power_spectral_density
(
self
,
power_spectral_density
):
self
.
__power_spectral_density
=
power_spectral_density
self
.
_interpolate_power_spectral_density
()
self
.
__both_updated
=
~
self
.
__both_updated
if
not
self
.
__both_updated
:
self
.
amplitude_spectral_density
(
power_spectral_density
**
0.5
)
@property
def
amplitude_spectral_density
(
self
):
return
self
.
__amplitude_spectral_density
@power_spectral_density.setter
def
power_spectral_density
(
self
,
amplitude_spectral_density
):
self
.
__amplitude_spectral_density
=
amplitude_spectral_density
self
.
__both_updated
=
~
self
.
__both_updated
if
not
self
.
__both_updated
:
self
.
power_spectral_density
(
amplitude_spectral_density
**
2
)
def
import_amplitude_spectral_density
(
self
):
"""
Automagically load one of the amplitude spectral density curves contained in the noise_curves directory.
...
...
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