Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Chad Hanna
manifold
Commits
101e1635
Commit
101e1635
authored
Feb 02, 2022
by
James Kennington
Browse files
flow duration argument
parent
37c2732f
Pipeline
#351231
passed with stage
in 3 minutes and 2 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
manifold/sources/cbc.py
View file @
101e1635
...
...
@@ -307,11 +307,12 @@ class CBCMetric(metric.Metric):
WAVEFORM_COORDS
=
(
M1
,
M2
,
S1X
,
S1Y
,
S1Z
,
S2X
,
S2Y
,
S2Z
)
WAVEFORM_COORD_DEFAULTS
=
{
S1X
:
0.
,
S1Y
:
0.
,
S1Z
:
0.
,
S2X
:
0.
,
S2Y
:
0.
,
S2Z
:
0.
}
def
__init__
(
self
,
psd
=
None
,
coord_func
=
None
,
flow
=
15.0
,
fhigh
=
512.
,
approximant
=
"IMRPhenomD"
,
max_metric_diff
:
float
=
metric
.
DEFAULT_MAX_DIFF_THRESHOLD
,
max_duration
:
float
=
numpy
.
inf
):
def
__init__
(
self
,
psd
=
None
,
coord_func
=
None
,
flow
=
15.0
,
fhigh
=
512.
,
approximant
=
"IMRPhenomD"
,
max_metric_diff
:
float
=
metric
.
DEFAULT_MAX_DIFF_THRESHOLD
,
duration
:
float
=
metric
.
DEFAULT_DURATION
,
max_duration
:
float
=
numpy
.
inf
):
self
.
appxstr
=
approximant
self
.
approximant
=
lalsim
.
GetApproximantFromString
(
approximant
)
self
.
max_duration
=
max_duration
metric
.
Metric
.
__init__
(
self
,
psd
,
coord_func
,
flow
,
fhigh
,
max_metric_diff
=
max_metric_diff
)
metric
.
Metric
.
__init__
(
self
,
psd
,
coord_func
,
flow
,
fhigh
,
duration
=
duration
,
max_metric_diff
=
max_metric_diff
)
def
_to_dict
(
self
):
return
{
"psd"
:
self
.
psd
,
"coord_func"
:
{
self
.
coord_func
.
key
:
self
.
coord_func
.
to_dict
()},
"flow"
:
self
.
freq_low
,
"fhigh"
:
self
.
freq_high
,
"approximant"
:
self
.
appxstr
,
"max_metric_diff"
:
self
.
max_diff_threshold
,
"max_duration"
:
self
.
max_duration
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment