Skip to content
Snippets Groups Projects
Commit 752a5f2a authored by ChiWai Chan's avatar ChiWai Chan
Browse files

gstlal_inspiral and svd_bank.py: skipping noise templates when doing...

gstlal_inspiral and svd_bank.py: skipping noise templates when doing prepossing and negate the template id of the noise templates so that it doesn't match with any signal templates.
parent 51fb194b
No related branches found
No related tags found
No related merge requests found
Pipeline #266921 passed
......@@ -728,6 +728,8 @@ for output_file_number, (svd_bank_url_dict, output_url, ranking_stat_output_url,
horizon_factors = {}
for bank in list(banks.values())[0]:
use_time_reverse |= bank.bank_type == "noise_model"
if bank.bank_type == "noise_model":
continue
sngl_inspiral_table.extend(bank.sngl_inspiral_table)
horizon_factors.update(bank.horizon_factors)
@bottle.route("/template_bank.xml.gz")
......
......@@ -360,6 +360,10 @@ def write_bank(filename, banks, psd_input, verbose = False):
# set up root for this sub bank
root = lw.appendChild(ligolw.LIGO_LW(Attributes({u"Name": u"gstlal_svd_bank_Bank"})))
# make non-signal model templates have an invalid template id
if bank.bank_type != "signal_model":
for row in bank.sngl_inspiral_table:
row.template_id = -row.template_id
# put the possibly clipped table into the file
root.appendChild(bank.sngl_inspiral_table)
......@@ -507,7 +511,7 @@ def read_banks(filename, contenthandler, verbose = False):
template_id, func = horizon_distance_func(banks)
horizon_norm = None
for bank in banks:
if template_id in bank.horizon_factors:
if template_id in bank.horizon_factors and bank.bank_type == "signal_model":
assert horizon_norm is None
horizon_norm = bank.horizon_factors[template_id]
for bank in banks:
......
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