Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update offline source probability for change to mchirp area #4882

Merged
merged 4 commits into from
Sep 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions bin/pycbc_source_probability_offline
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,10 @@ parser.add_argument('--search-tag', required=True,
parser.add_argument('--ifar-threshold', type=float, default=None,
help='Select only candidate events with IFAR '
'above threshold.')
parser.add_argument('--include-mass-gap', action='store_true',
help='Option to include the Mass Gap region.')
mchirp_area.insert_args(parser)
args = parser.parse_args()

mc_area_args = mchirp_area.from_cli(args)

if not args.include_mass_gap:
mass_bdary = mc_area_args['mass_bdary']
assert mass_bdary['ns_max'] == mass_bdary['gap_max'], \
'NS/Mass Gap boundaries should be the same.'
mc_area_args = mchirp_area.from_cli(args, parser)

pycbc.init_logging(args.verbose)

Expand Down Expand Up @@ -87,7 +80,8 @@ for event in tqdm.trange(len(ifar)):
/ sngl_snr[ifo][0][event] for ifo in ifos_event])
probs = mchirp_area.calc_probabilities(mchirp[event], coinc_snr,
min_eff_dist, mc_area_args)
if not args.include_mass_gap:
# We do not expect a mass gap entry, but just in case
if "Mass Gap" in probs:
probs.pop("Mass Gap")
ifo_names = ''.join(sorted(ifos_event))
out_name = dir_path + '%s-%s-%i-1.json' % (ifo_names, args.search_tag,
Expand Down
Loading