Skip to content

Commit

Permalink
Various tidying up
Browse files Browse the repository at this point in the history
  • Loading branch information
GarethCabournDavies committed Aug 22, 2024
1 parent 9dd325e commit b12bad3
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 19 deletions.
2 changes: 1 addition & 1 deletion bin/plotting/pycbc_page_foreground
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ parser.add_argument('--use-exclusive-ifar', action='store_true',
help='Indicate to use exclusive IFAR rather than '
'inclusive. Incompatible with '
'--use-hierarchical-level.')
parser.add_argument('--use-hierarchical-level', type=int, default=None,
parser.add_argument('--use-hierarchical-level', type=int,
help='Indicate which FARs to write to the table '
'based on the number of hierarchical removals done. '
'Choosing None defaults to giving the FARs after '
Expand Down
22 changes: 9 additions & 13 deletions bin/workflows/pycbc_make_offline_search_workflow
Original file line number Diff line number Diff line change
Expand Up @@ -708,19 +708,15 @@ for inj_file, tag in zip(inj_files, inj_tags):
files_for_combined_injfind.append(file_for_injfind)

# setup the matchedfilter jobs
if inj_file is None:
# datafind may be different for unknown injections
datafind_files_inj, _, analyzable_segs_inj, _ = \
wf.setup_datafind_workflow(
workflow,
ssegs,
"datafind",
seg_file=science_seg_file,
tags=hoft_tags+ctags
)
else:
datafind_files_inj = datafind_files
analyzable_segs_inj = analyzable_segs
# datafind may be different for unknown injections
datafind_files_inj, _, analyzable_segs_inj, _ = \
wf.setup_datafind_workflow(
workflow,
ssegs,
"datafind",
seg_file=science_seg_file,
tags=hoft_tags+ctags
)

insps = wf.setup_matchedfltr_workflow(
workflow,
Expand Down
1 change: 0 additions & 1 deletion examples/search/analysis.ini
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ loudest-keep-values = [-1:5,1:5]
loudest-keep-values = [-3:5,-1:5]

[coinc-injinj]
coinc-threshold = 0.0025

[sngls]
trigger-cuts = newsnr:5.5:lower traditional_chisq:12:upper sigma_multiple:10:upper
Expand Down
2 changes: 1 addition & 1 deletion pycbc/io/hdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,7 @@ def to_coinc_xml_object(self, file_name):

ligolw_utils.write_filename(outdoc, file_name)

def to_coinc_hdf_object(self, file_name, exclusive=False):
def to_coinc_hdf_object(self, file_name):
ofd = HFile(file_name,'w')

# Some fields are special cases
Expand Down
9 changes: 6 additions & 3 deletions pycbc/types/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,11 @@ def read_ini_file(self, fpath):

def get_subsections(self, section_name):
"""Return a list of subsections for the given section name"""
if not self.has_section(section_name):
# This section does nto exist - we might hit this if we are
# using multiple tags for a section of the config (i.e.
# [section-tag-tag])
return []
# Keep only subsection names
subsections = [
sec[len(section_name) + 1:]
Expand Down Expand Up @@ -279,10 +284,8 @@ def get_subsections(self, section_name):

if len(subsections) > 0:
return [sec.split("-")[0] for sec in subsections]
elif self.has_section(section_name):
return [""]
else:
return []
return [""]

def perform_extended_interpolation(self):
"""
Expand Down

0 comments on commit b12bad3

Please sign in to comment.