# cvs_repository="sbank", cvs_entry_time=git_version.date) FIXME process = ligolw_process.register_to_xmldoc( fake_xmldoc, "lalapps_cbc_sbank_sim", opts_dict, version="no version", cvs_repository="sbank", cvs_entry_time=strftime('%Y/%m/%d %H:%M:%S')) # load templates # # initialize the bank # bank = Bank(noise_model, flow, use_metric=False, cache_waveforms=opts.cache_waveforms, nhood_size=opts.neighborhood_size, nhood_param=opts.neighborhood_param) for file_approx in opts.template_bank: # if no approximant specified, take from opts.template_approx if len(file_approx.split(":")) == 1: seed_file = file_approx approx = opts.template_approx else: # if this fails, you have an input error seed_file, approx = file_approx.split(":") # add templates to bank tmpdoc = utils.load_filename(seed_file, contenthandler=ContentHandler) sngl_inspiral = lsctables.SnglInspiralTable.get_table(tmpdoc)
# so set the PSD to infinity above the max original frequency noise_model = lambda g: np.where(g < f_max_orig, np.exp(interpolator(g)), np.inf) else: noise_model = noise_models[opts.noise_model] # # initialize the bank # bank = Bank(noise_model, opts.flow, opts.use_metric, opts.cache_waveforms, opts.neighborhood_size, opts.neighborhood_param, coarse_match_df=opts.coarse_match_df, iterative_match_df_max=opts.iterative_match_df_max, fhigh_max=opts.fhigh_max, optimize_flow=opts.optimize_flow, flow_column=opts.flow_column) for file_approx in opts.bank_seed: # if no approximant specified, use same approximant as the # templates we will add if len(file_approx.split(":")) == 1: seed_file = file_approx approx = opts.approximant else: # if this fails, you have an input error seed_file, approx = file_approx.split(":")
psd = REAL8FrequencySeries(name="psd", f0=0., deltaF=1., data=get_PSD(1., opts.flow, 1570., noise_model)) # # seed the bank, if applicable # if opts.bank_seed is None: # seed the process with an empty bank # the first proposal will always be accepted bank = Bank(waveform, noise_model, opts.flow, opts.use_metric, opts.cache_waveforms, opts.neighborhood_size, opts.neighborhood_param, coarse_match_df=opts.coarse_match_df, iterative_match_df_max=opts.iterative_match_df_max, fhigh_max=opts.fhigh_max) else: # seed bank with input bank. we do not prune the bank # for overcoverage, but take it as is tmpdoc = utils.load_filename(opts.bank_seed, contenthandler=ContentHandler) sngl_inspiral = table.get_table(tmpdoc, lsctables.SnglInspiralTable.tableName) bank = Bank.from_sngls(sngl_inspiral, waveform, noise_model, opts.flow, opts.use_metric,