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

look for injections not only on the top-level in hdf file #4876

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
7 changes: 6 additions & 1 deletion pycbc/inference/io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,12 @@ def injections_from_cli(opts):
# loop over all input files getting the injection files
for input_file in input_files:
fp = loadfile(input_file, 'r')
these_injs = fp.read_injections()
cp = fp.read_config_file()
if cp.has_option('model', 'primary_model'):
primary_model_label = cp.get('model', 'primary_model')
these_injs = fp.read_injections(group='/%s' % primary_model_label)
else:
these_injs = fp.read_injections()
# apply mapping if it was provided
if param_map:
mapvals = {sp: these_injs[ip] for ip, sp in param_map}
Expand Down
Loading