Skip to content
Snippets Groups Projects
Commit 09c1b4d1 authored by Melissa Frei's avatar Melissa Frei
Browse files

Merge branch 'svd_patch'

parents 50959c82 4f8e3c92
No related branches found
No related tags found
No related merge requests found
......@@ -60,10 +60,22 @@ from gstlal import templates
#
def read_approximant(xmldoc):
approximant=ligolw_process.get_process_params(xmldoc, "tmpltbank", "--approximant")
approximant=approximant[0]
approximant = set()
try:
approximant.add(ligolw_process.get_process_params(xmldoc, "tmpltbank", "--approximant")[0])
except:
pass
try:
approximant.add(ligolw_process.get_process_params(xmldoc, "makeBank", "--approximant")[0])
except:
pass
supported_approximants=[u'FindChirpSP', u'TaylorF2', u'IMRPhenomB']
if not approximant:
raise ValueError, "file must contain a process params entry for approximant in either tmpltbank or makeBank"
if len(approximant)>1:
raise ValueError, "file must contain only one approximant"
approximant=approximant.pop()
if approximant not in supported_approximants:
raise ValueError, "unsupported approximant %s"% approximant
return approximant
......
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