Skip to content
Snippets Groups Projects
Commit 3c1ac502 authored by Kipp Cannon's avatar Kipp Cannon
Browse files

create_prior_diststats: handle missing PSDs

for requested instruments
parent be6f5fe7
No related branches found
No related tags found
No related merge requests found
......@@ -152,7 +152,7 @@ for n, filename in enumerate(filenames, 1):
print >>sys.stderr, "%d/%d:" % (n, len(filenames)),
psd = lalseries.read_psd_xmldoc(ligolw_utils.load_filename(filename, contenthandler = lalseries.LIGOLWContentHandler, verbose = options.verbose))
for m1, m2 in options.horizon_distance_masses:
options.horizon_distances.append(dict((instrument, reference_psd.horizon_distance(psd[instrument], m1, m2, 8., options.horizon_distance_flow)) for instrument in options.instrument))
options.horizon_distances.append(dict((instrument, (0. if instrument not in psd else reference_psd.horizon_distance(psd[instrument], m1, m2, 8., options.horizon_distance_flow))) for instrument in options.instrument))
for horizon_distances in options.horizon_distances:
for n in range(2, len(horizon_distances) + 1):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment