Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
lscsoft
lalsuite
Commits
5e259444
Verified
Commit
5e259444
authored
Jun 03, 2019
by
Nathan K. Johnson-McDaniel
Committed by
Adam Mercer
Jun 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bayespputils.py: Removing some redundant code.
(cherry picked from commit
296db439
)
parent
0204fd49
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
25 deletions
+2
-25
lalinference/python/lalinference/bayespputils.py
lalinference/python/lalinference/bayespputils.py
+2
-25
No files found.
lalinference/python/lalinference/bayespputils.py
View file @
5e259444
...
...
@@ -995,31 +995,6 @@ class Posterior(object):
except KeyError:
print("Warning: Cannot find spin parameters. Skipping spin angle calculations.")
#Calculate effective precessing spin magnitude
if
(
'a1'
in
pos
.
names
and
'tilt1'
in
pos
.
names
and
'm1'
in
pos
.
names
)
and
(
'a2'
in
pos
.
names
and
'tilt2'
in
pos
.
names
and
'm2'
in
pos
.
names
):
pos
.
append_mapping
(
'chi_p'
,
chi_precessing
,
[
'a1'
,
'tilt1'
,
'm1'
,
'a2'
,
'tilt2'
,
'm2'
])
# Calculate redshift from luminosity distance measurements
if
(
'distance'
in
pos
.
names
):
pos
.
append_mapping
(
'redshift'
,
calculate_redshift
,
'distance'
)
elif
(
'dist'
in
pos
.
names
):
pos
.
append_mapping
(
'redshift'
,
calculate_redshift
,
'dist'
)
# Calculate source mass parameters
if
(
'm1'
in
pos
.
names
)
and
(
'redshift'
in
pos
.
names
):
pos
.
append_mapping
(
'm1_source'
,
source_mass
,
[
'm1'
,
'redshift'
])
if
(
'm2'
in
pos
.
names
)
and
(
'redshift'
in
pos
.
names
):
pos
.
append_mapping
(
'm2_source'
,
source_mass
,
[
'm2'
,
'redshift'
])
if
(
'mtotal'
in
pos
.
names
)
and
(
'redshift'
in
pos
.
names
):
pos
.
append_mapping
(
'mtotal_source'
,
source_mass
,
[
'mtotal'
,
'redshift'
])
if
(
'mc'
in
pos
.
names
)
and
(
'redshift'
in
pos
.
names
):
pos
.
append_mapping
(
'mc_source'
,
source_mass
,
[
'mc'
,
'redshift'
])
#Store signed spin magnitudes in separate parameters and make a1,a2 magnitudes
if 'a1' in pos.names:
if 'tilt1' in pos.names:
...
...
@@ -1060,6 +1035,8 @@ class Posterior(object):
# Calculate redshift from luminosity distance measurements
if('distance' in pos.names):
pos.append_mapping('redshift', calculate_redshift, 'distance')
elif('dist' in pos.names):
pos.append_mapping('redshift', calculate_redshift, 'dist')
# Calculate source mass parameters
if ('m1' in pos.names) and ('redshift' in pos.names):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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