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
16d28028
Commit
16d28028
authored
4 years ago
by
Gregory Ashton
Browse files
Options
Downloads
Plain Diff
Merge branch 'fix-mode-array' into 'master'
Fix mode array option See merge request
!765
parents
40df4b96
c768c983
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!765
Fix mode array option
Pipeline
#121999
passed
4 years ago
Stage: test
Stage: deploy
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bilby/gw/source.py
+18
-18
18 additions, 18 deletions
bilby/gw/source.py
with
18 additions
and
18 deletions
bilby/gw/source.py
+
18
−
18
View file @
16d28028
...
...
@@ -67,18 +67,18 @@ def lal_binary_black_hole(
mode_array:
Activate a specific mode array and evaluate the model using those
modes only. e.g. waveform_arguments =
dict(waveform_approximant=
'
IMRPhenomHM
'
, modearray=[[2,2],[2,-2])
dict(waveform_approximant=
'
IMRPhenomHM
'
, mode
_
array=[[2,2],[2,-2])
returns the 22 and 2-2 modes only of IMRPhenomHM. You can only
specify modes that are included in that particular model. e.g.
waveform_arguments = dict(waveform_approximant=
'
IMRPhenomHM
'
,
modearray=[[2,2],[2,-2],[5,5],[5,-5]]) is not allowed because the
mode
_
array=[[2,2],[2,-2],[5,5],[5,-5]]) is not allowed because the
55 modes are not included in this model. Be aware that some models
only take positive modes and return the positive and the negative
mode together, while others need to call both. e.g.
waveform_arguments = dict(waveform_approximant=
'
IMRPhenomHM
'
,
modearray=[[2,2],[4,-4]]) returns the 22 and 2-2 of IMRPhenomHM.
mode
_
array=[[2,2],[4,-4]]) returns the 22 and 2-2 of IMRPhenomHM.
However, waveform_arguments =
dict(waveform_approximant=
'
IMRPhenomXHM
'
, modearray=[[2,2],[4,-4]])
dict(waveform_approximant=
'
IMRPhenomXHM
'
, mode
_
array=[[2,2],[4,-4]])
returns the 22 and 4-4 of IMRPhenomXHM.
Returns
...
...
@@ -150,18 +150,18 @@ def lal_binary_neutron_star(
mode_array:
Activate a specific mode array and evaluate the model using those
modes only. e.g. waveform_arguments =
dict(waveform_approximant=
'
IMRPhenomHM
'
, modearray=[[2,2],[2,-2])
dict(waveform_approximant=
'
IMRPhenomHM
'
, mode
_
array=[[2,2],[2,-2])
returns the 22 and 2-2 modes only of IMRPhenomHM. You can only
specify modes that are included in that particular model. e.g.
waveform_arguments = dict(waveform_approximant=
'
IMRPhenomHM
'
,
modearray=[[2,2],[2,-2],[5,5],[5,-5]]) is not allowed because the
mode
_
array=[[2,2],[2,-2],[5,5],[5,-5]]) is not allowed because the
55 modes are not included in this model. Be aware that some models
only take positive modes and return the positive and the negative
mode together, while others need to call both. e.g.
waveform_arguments = dict(waveform_approximant=
'
IMRPhenomHM
'
,
modearray=[[2,2],[4,-4]]) returns the 22 a
\n
d 2-2 of IMRPhenomHM.
mode
_
array=[[2,2],[4,-4]]) returns the 22 a
\n
d 2-2 of IMRPhenomHM.
However, waveform_arguments =
dict(waveform_approximant=
'
IMRPhenomXHM
'
, modearray=[[2,2],[4,-4]])
dict(waveform_approximant=
'
IMRPhenomXHM
'
, mode
_
array=[[2,2],[4,-4]])
returns the 22 and 4-4 of IMRPhenomXHM.
Returns
...
...
@@ -217,18 +217,18 @@ def lal_eccentric_binary_black_hole_no_spins(
mode_array:
Activate a specific mode array and evaluate the model using those
modes only. e.g. waveform_arguments =
dict(waveform_approximant=
'
IMRPhenomHM
'
, modearray=[[2,2],[2,-2])
dict(waveform_approximant=
'
IMRPhenomHM
'
, mode
_
array=[[2,2],[2,-2])
returns the 22 and 2-2 modes only of IMRPhenomHM. You can only
specify modes that are included in that particular model. e.g.
waveform_arguments = dict(waveform_approximant=
'
IMRPhenomHM
'
,
modearray=[[2,2],[2,-2],[5,5],[5,-5]]) is not allowed because the
mode
_
array=[[2,2],[2,-2],[5,5],[5,-5]]) is not allowed because the
55 modes are not included in this model. Be aware that some models
only take positive modes and return the positive and the negative
mode together, while others need to call both. e.g.
waveform_arguments = dict(waveform_approximant=
'
IMRPhenomHM
'
,
modearray=[[2,2],[4,-4]]) returns the 22 and 2-2 of IMRPhenomHM.
mode
_
array=[[2,2],[4,-4]]) returns the 22 and 2-2 of IMRPhenomHM.
However, waveform_arguments =
dict(waveform_approximant=
'
IMRPhenomXHM
'
, modearray=[[2,2],[4,-4]])
dict(waveform_approximant=
'
IMRPhenomXHM
'
, mode
_
array=[[2,2],[4,-4]])
returns the 22 and 4-4 of IMRPhenomXHM.
Returns
...
...
@@ -343,12 +343,12 @@ def _base_lal_cbc_fd_waveform(
lalsim_SimInspiralWaveformParamsInsertTidalLambda2
(
waveform_dictionary
,
lambda_2
)
if
'
modearray
'
in
waveform_kwargs
:
modearray
=
waveform_kwargs
[
'
modearray
'
]
mode_array
=
lalsim
.
SimInspiralCreateModeArray
()
for
mode
in
modearray
:
lalsim
.
SimInspiralModeArrayActivateMode
(
mode_array
,
mode
[
0
],
mode
[
1
])
lalsim
.
SimInspiralWaveformParamsInsertModeArray
(
waveform_dictionary
,
mode_array
)
if
(
'
mode
_
array
'
in
waveform_kwargs
)
and
waveform_kwargs
[
'
mode_array
'
]
is
not
None
:
mode
_
array
=
waveform_kwargs
[
'
mode
_
array
'
]
mode_array
_lal
=
lalsim
.
SimInspiralCreateModeArray
()
for
mode
in
mode
_
array
:
lalsim
.
SimInspiralModeArrayActivateMode
(
mode_array
_lal
,
mode
[
0
],
mode
[
1
])
lalsim
.
SimInspiralWaveformParamsInsertModeArray
(
waveform_dictionary
,
mode_array
_lal
)
if
lalsim
.
SimInspiralImplementedFDApproximants
(
approximant
):
wf_func
=
lalsim_SimInspiralChooseFDWaveform
...
...
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