Commit 3c38198d authored by Karl Wette's avatar Karl Wette
Browse files

Merge branch 'master' into 'master' fix bug in conversion from Q22 to h0

See merge request !179
parents 2e9be355 b5cc8774
Pipeline #14508 passed with stages
in 25 minutes and 59 seconds
......@@ -2491,7 +2491,7 @@ def pulsar_nest_to_posterior(postfile, nestedsamples=False, removeuntrig=True):
posfreqs = pos[pname].samples[0]
elif pname == 'dist':
# try getting a fixed distance value (for calculating h0 from Q22 if required)
posdist = pos[pname].samples[0]
posdist = pos[pname].samples[0]/KPC
......@@ -2559,11 +2559,11 @@ def pulsar_nest_to_posterior(postfile, nestedsamples=False, removeuntrig=True):
posQ22 = pos['q22'].samples
if 'dist' in pos.names:
posdist = pos['dist'].samples # distance in metre (for use in converting Q22 to h0)
posdist = pos['dist'].samples/KPC # distance in kpc (for use in converting Q22 to h0)
# convert distance samples to kpc
distpos = bppu.PosteriorOneDPDF('dist', posdist/KPC)
distpos = bppu.PosteriorOneDPDF('dist', posdist)
if 'f0' in pos.names:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment