Commit 684bd84d authored by Manoj Kovalam's avatar Manoj Kovalam
Browse files

Updating gstlal_iir_bank to latest

parent 6c062f50
......@@ -56,18 +56,9 @@ parser = OptionParser(description = __doc__)
parser.add_option("--flow", metavar = "Hz", type = "float", default = 15.0, help = "Set the template low-frequency cut-off (default = 15.0).")
parser.add_option("--snr-cut", type = "float", default = 0.998, help = "Set the SNR contribution kept for filter placement (default = 0.998).")
parser.add_option("--sampleRate", metavar = "Hz", type = "float", default = 4096.0, help = "Set the sample rate of the IIR template bank (optional).")
parser.add_option("--negative-latency", metavar = "seconds", type = "float", default = 0, help = "Set the number of seconds of negative latency.")
parser.add_option("--padding", metavar = "pad", type = "float", default = 1.3, help = "Fractional amount to pad time slices.")
parser.add_option("--autocorrelation-length", metavar = "len", type = "int", default = 201, help = "Autocorrelation length for chisq.")
parser.add_option("--epsilon-start", metavar = "pad", type = "float", default = 0.02, help = "Second order correction factor.")
parser.add_option("--epsilon-min", type = "float", default = 0.001, help = "Second order correction factor.")
parser.add_option("--epsilon-max", type = "float", default = None, help = "Second order correction factor.")
parser.add_option("--filters-min", metavar = "len", type = "int", default = 0, help = "Minimal number of filters.")
parser.add_option("--filters-max", metavar = "len", type = "int", default = None, help = "Maximal number of filters.")
parser.add_option("--filters-per-loglen-min", metavar = "len", type = "int", default = 0, help = "Minimal number of filters per log_2(length).")
parser.add_option("--filters-per-loglen-max", metavar = "len", type = "int", default = None, help = "Maximal number of filters per log_2(length).")
parser.add_option("--initial-overlap-min", metavar = "match", type = "float", default = None, help = "Set the SPIIR approximation minimal match (default = 0.99).")
parser.add_option("--b0-optimized-overlap-min", metavar = "match", type = "float", default = None, help = "Set the SPIIR approximation minimal match (default = None).")
parser.add_option("--final-overlap-min", metavar = "match", type = "float", default = None, help = "Set the SPIIR approximation minimal match (default = None).")
parser.add_option("--reference-psd", metavar = "filename", help = "load the spectrum from this LIGO light-weight XML file (required).")
parser.add_option("--template-bank", metavar = "filename", help = "Set the name of the LIGO light-weight XML file from which to load the template bank (required).")
#FIXME figure out how to encode instrument info
......@@ -77,6 +68,7 @@ parser.add_option("--approximant", default = "SpinTaylorT4", help = "Set the app
parser.add_option("--output", metavar = "filename", help = "Set the filename in which to save the template bank (required).")
parser.add_option("--downsample", action = "store_true", help = "Choose if you want to downsample IIR bank (recommended)")
parser.add_option("--optimizer-options", default="{}", help = "Pass dictionary of options to the optimizer (parsed using json.loads).")
parser.add_option("--epsilon-options", default="{}", help = "Pass dictionary of options for epsilon selection (parsed using json.loads).")
parser.add_option("-v", "--verbose", action = "store_true", help = "Be verbose (optional).")
options, filenames = parser.parse_args()
......@@ -96,30 +88,26 @@ else:
# generate the iir coefficients and write to xml
bank = Bank()
epsilon_options = json.loads(options.epsilon_options)
optimizer_options = json.loads(options.optimizer_options)
print >> sys.stderr, epsilon_options
print >> sys.stderr, optimizer_options
bank.build_from_tmpltbank(
options.template_bank,
sampleRate = options.sampleRate,
negative_latency = options.negative_latency,
all_psd = ALLpsd,
verbose=options.verbose,
padding=options.padding,
flower=options.flow,
snr_cut=options.snr_cut,
downsample = options.downsample,
optimizer_options = json.loads(options.optimizer_options),
optimizer_options = optimizer_options,
waveform_domain = options.waveform_domain,
approximant = options.approximant,
epsilon_start = options.epsilon_start,
epsilon_min = options.epsilon_min,
epsilon_max = options.epsilon_max,
filters_min = options.filters_min,
filters_max = options.filters_max,
filters_per_loglen_min = options.filters_per_loglen_min,
filters_per_loglen_max = options.filters_per_loglen_max,
initial_overlap_min = options.initial_overlap_min,
b0_optimized_overlap_min = options.b0_optimized_overlap_min,
final_overlap_min = options.final_overlap_min,
autocorrelation_length = options.autocorrelation_length)
autocorrelation_length = options.autocorrelation_length,
**epsilon_options)
bank.write_to_xml(options.output)
......@@ -85,6 +85,7 @@
*/
#include <gstlal/gstlal.h>
#include <gstlal/gstlal_tags.h>
#include <gstlal_simulation.h>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment