Skip to content

Commit

Permalink
Merge branch 'distances' into 'master'
Browse files Browse the repository at this point in the history
Allow pulsar distances to be extracted from .par files rather than using ATNF values

See merge request cwinpy/cwinpy!187
  • Loading branch information
mattpitkin committed Apr 15, 2024
2 parents 3c7a824 + d08f1f3 commit 3cea0cf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cwinpy/pe/summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -891,12 +891,21 @@ def generate_summary_pages(**kwargs):
# extract run information from configuration file
pipeline_data = pe_pipeline(config=configfile, build=False)

# extract any distances from pulsar .par files
distances = {}
for psr in pipeline_data.pulsardict:
if is_par_file(pipeline_data.pulsardict[psr]):
p = PulsarParameters(pipeline_data.pulsardict[psr])
if p["DIST"] is not None:
distances[psr] = p["DIST"]

# get table of upper limits
ultable = UpperLimitTable(
resdir=pipeline_data.resultsbase,
includesdlim=True,
includeell=True,
includeq22=True,
distances=distances,
)

# get only the requested pulsars
Expand Down

0 comments on commit 3cea0cf

Please sign in to comment.