Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SEOBNRE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Yifan Wang
SEOBNRE
Commits
29c48597
Commit
29c48597
authored
4 years ago
by
Yifan Wang
Browse files
Options
Downloads
Patches
Plain Diff
add time length for pycbc injection
parent
7882f1bb
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
SEOBNRE.py
+21
-6
21 additions, 6 deletions
SEOBNRE.py
with
21 additions
and
6 deletions
SEOBNRE.py
+
21
−
6
View file @
29c48597
...
...
@@ -2,17 +2,27 @@ from ctypes import *
import
numpy
from
pycbc.types
import
TimeSeries
,
FrequencySeries
import
os
def
SEOBNRE_td
(
**
kwargs
):
lib
=
CDLL
(
'
$LD_LIBRARY_PATH/libSEOBNRE.so
'
)
waveform_generation
=
lib
.
genwaveform
waveform_generation
.
argtypes
=
[
POINTER
(
c_double
),
POINTER
(
c_double
),
\
f
=
lib
.
genwaveform
f
.
argtypes
=
[
POINTER
(
c_double
),
POINTER
(
c_double
),
\
POINTER
(
c_double
),
POINTER
(
c_int
),
\
c_double
,
c_double
,
c_double
,
c_double
,
c_double
,
c_double
,
c_double
,
c_double
,
c_double
,
c_double
,
c_double
]
params
=
{
'
coa_phase
'
:
0.0
,
'
delta_t
'
:
None
,
'
mass1
'
:
None
,
'
mass2
'
:
None
,
\
'
spin1z
'
:
0.0
,
'
spin2z
'
:
0.0
,
'
f_lower
'
:
None
,
'
eccentricity
'
:
0.0
,
'
distance
'
:
1.0
,
'
inclination
'
:
0.0
,
\
# initiate the waveform parameters
params
=
{
'
coa_phase
'
:
0.0
,
'
delta_t
'
:
None
,
'
mass1
'
:
None
,
'
mass2
'
:
None
,
'
spin1z
'
:
0.0
,
'
spin2z
'
:
0.0
,
'
f_lower
'
:
None
,
'
eccentricity
'
:
0.0
,
'
distance
'
:
1.0
,
'
inclination
'
:
0.0
,
'
long_asc_nodes
'
:
0.0
}
for
value
in
params
:
if
value
in
kwargs
:
...
...
@@ -28,7 +38,7 @@ def SEOBNRE_td(**kwargs):
t0
=
numpy
.
array
([
1.
])
# Generate the waveform
waveform_generation
(
hplus
.
ctypes
.
data_as
(
POINTER
(
c_double
)),
hcross
.
ctypes
.
data_as
(
POINTER
(
c_double
)),
f
(
hplus
.
ctypes
.
data_as
(
POINTER
(
c_double
)),
hcross
.
ctypes
.
data_as
(
POINTER
(
c_double
)),
t0
.
ctypes
.
data_as
(
POINTER
(
c_double
)),
truesize
.
ctypes
.
data_as
(
POINTER
(
c_int
)),
params
[
'
coa_phase
'
],
params
[
'
delta_t
'
],
params
[
'
mass1
'
],
params
[
'
mass2
'
],
params
[
'
spin1z
'
],
params
[
'
spin2z
'
],
params
[
'
f_lower
'
],
params
[
'
eccentricity
'
],
params
[
'
distance
'
],
params
[
'
inclination
'
],
params
[
'
long_asc_nodes
'
])
...
...
@@ -44,8 +54,13 @@ def SEOBNRE_td(**kwargs):
return
hp
,
hc
def
SEOBNRE_fd
(
**
kwargs
):
hp
,
hc
=
SEOBNRE_td
(
**
kwargs
)
return
(
hp
.
to_frequencyseries
(),
hc
.
to_frequencyseries
())
def
add_me
(
**
kwds
):
kwds
[
'
cpu_td
'
][
'
SEOBNRE
'
]
=
SEOBNRE_td
kwds
[
'
filter_time_lengths
'
][
'
SEOBNRE
'
]
=
kwds
[
'
filter_time_lengths
'
][
'
SEOBNRv4
'
]
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