Commit f6d30ee6 authored by John Douglas Veitch's avatar John Douglas Veitch
Browse files

lalapps_cbc_pipedown_ssipe: add checks for PREGEN_INJFILE. Fixes bug #1528

Original: c99613dab4f06341ae94e77826903d2e03e38770
parent b10b1d8c
......@@ -171,14 +171,14 @@ coinc_slide_tag = cp.get('pipeline', 'coinc-slide-file-tag')
search_file_tag = cp.get('pipeline', 'search-file-tag')
ihope_cache = [line for line in file(options.ihope_cache) \
if coinc_zero_lag_tag in line or coinc_slide_tag in line \
or " INJECTIONS" in line or search_file_tag in line]
or (" INJECTIONS" in line or " PREGEN_INJFILE" in line ) or search_file_tag in line]
zero_lag_cache = lal.Cache([lal.CacheEntry(entry) for entry in ihope_cache \
if coinc_zero_lag_tag in entry])
slide_cache = lal.Cache([lal.CacheEntry(entry) for entry in ihope_cache \
if coinc_slide_tag in entry])
inj_cache = lal.Cache([lal.CacheEntry(entry) for entry in ihope_cache if \
" INJECTIONS" in entry])
(" INJECTIONS" in entry or " PREGEN_INJFILE" in entry)])
all_inspirals_cache = lal.Cache([lal.CacheEntry(entry) for entry in ihope_cache \
if search_file_tag in entry])
......
......@@ -164,12 +164,12 @@ print "Parsing the ihope cache..."
coinc_tag = cp.get('pipeline', 'coinc-file-tag')
ihope_cache = [line for line in file(options.ihope_cache) \
if coinc_tag in line or " INJECTIONS" in line]
if coinc_tag in line or " INJECTIONS" in line or " PREGEN_INJFILE" in line]
thinca_cache = lal.Cache([lal.CacheEntry(entry) for entry in ihope_cache \
if coinc_tag in entry])
inj_cache = lal.Cache([lal.CacheEntry(entry) for entry in ihope_cache if \
" INJECTIONS" in entry])
" INJECTIONS" in entry or " PREGEN_INJFILE" in entry])
del ihope_cache
......@@ -364,7 +364,8 @@ for tag in user_tags:
# is an injection file for this tag
file_sieve = '_'.join([ r'INJECTIONS_[0-9]{1,}', tag.split('_CAT_')[0] ]) + r'$'
inj_file = [ entry for entry in inj_cache if re.match(file_sieve, entry.description) is not None ]
file_sieve2 = '_'.join([ r'PREGEN_INJFILE_[0-9]{1,}', tag.split('_CAT_')[0] ]) + r'$'
inj_file = [ entry for entry in inj_cache if re.match(file_sieve, entry.description) is not None or re.match(file_sieve2,entry.description) is not None ]
if len(inj_file) == 0:
simulation = False
elif len(inj_file) == 1:
......
Markdown is supported
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