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

clean up typos

parent f1f32b2c
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABLITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
......@@ -59,6 +59,7 @@ from gstlal import cbc_template_fir
from gstlal import misc as gstlalmisc
from gstlal import templates
#
# =============================================================================
#
......@@ -152,12 +153,6 @@ def add_cbc_metadata(xmldoc, process, seg):
return search_summary
#
# =============================================================================
#
......@@ -201,7 +196,7 @@ class Bank(object):
self.filter_length = max(fragment.end for fragment in bank_fragments)
self.snr_threshold = snr_threshold
self.logname = logname
sample_rate = max(bank_fragment.rate for bank_fragment in bank_fragments)
template_bank, self.autocorrelation_bank = cbc_template_fir.generate_templates(lsctables.table.get_table(utils.load_filename(template_bank_filename, gz = (template_bank_filename or "stdin").endswith(".gz"), verbose = verbose), lsctables.SnglInspiralTable.tableName), psd, flow, sample_rate, self.filter_length, autocorrelation_length = autocorrelation_length, verbose = verbose)
......@@ -811,9 +806,7 @@ banks = [
Bank(
template_bank_filename,
psd,
[ Bank.BankFragment(rate,begin,end)
for rate,begin,end in
templates.time_frequency_boundaries(template_bank_filename,flow=options.flow)],
[Bank.BankFragment(rate, begin, end) for rate, begin, end in templates.time_frequency_boundaries(template_bank_filename, flow = options.flow)],
gate_fap = options.ortho_gate_fap,
snr_threshold = options.snr_threshold,
tolerance = options.svd_tolerance,
......@@ -854,7 +847,6 @@ sngl_inspiral_table.sync_next_id()
#
pipeline = gst.Pipeline("gstlal_inspiral")
mainloop = gobject.MainLoop()
......@@ -886,6 +878,7 @@ handler = LLOIDHandler(mainloop, pipeline, verbose = options.verbose)
# process requested segment
#
pipeline.set_state(gst.STATE_PAUSED)
pipeline.seek(1.0, gst.Format(gst.FORMAT_TIME), gst.SEEK_FLAG_FLUSH, gst.SEEK_TYPE_SET, options.seg[0].ns(), gst.SEEK_TYPE_SET, options.seg[1].ns())
pipeline.set_state(gst.STATE_PLAYING)
......@@ -897,7 +890,6 @@ mainloop.run()
#
sngl_inspiral_table.sort(lambda a, b: cmp(a.end_time, b.end_time) or cmp(a.end_time_ns, b.end_time_ns) or cmp(a.ifo, b.ifo))
for row in sngl_inspiral_table:
row.process_id = process.process_id
......
......@@ -33,6 +33,7 @@ from pylal import spawaveform
from glue.ligolw import lsctables
from glue.ligolw import utils
__author__ = "Kipp Cannon <kipp.cannon@ligo.org>, Chad Hanna <chad.hanna@ligo.org>, Drew Keppel <drew.keppel@ligo.org>"
__version__ = "FIXME"
__date__ = "FIXME"
......@@ -164,20 +165,23 @@ def normalized_autocorrelation(fseries, revplan):
return tseries
def time_frequency_boundaries( template_bank_filename,
segment_samples_max = 2048,
flow = 64,
sample_rate_max = 2048,
padding = 0.9 ):
def time_frequency_boundaries(
template_bank_filename,
segment_samples_max = 2048,
flow = 64,
sample_rate_max = 2048,
padding = 0.9
):
"""
The function time_frequency_boundaries splits a template bank up by times
for which different sampling rates are appropriate. The function returns
a list of 3-tuples of the form (rate,begin,end) where rate is the sampling
rate and begin/end mark the boundaries during which the given rate is
guaranteed to be appropriate (no template exceeds a frequency of padding*Nyquist
during these times and no lower sampling rate would work). For computational
purposes, no time interval exceeds max_samples_per_segment. The same rate may
therefore apply to more than one segment.
The function time_frequency_boundaries splits a template bank up by
times for which different sampling rates are appropriate. The
function returns a list of 3-tuples of the form (rate,begin,end)
where rate is the sampling rate and begin/end mark the boundaries
during which the given rate is guaranteed to be appropriate (no
template exceeds a frequency of padding*Nyquist during these times
and no lower sampling rate would work). For computational
purposes, no time interval exceeds max_samples_per_segment. The
same rate may therefore apply to more than one segment.
"""
# Round a number up to the nearest power of 2
def ceil_pow_2( number ):
......
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