Skip to content
Snippets Groups Projects
Commit dc85571b authored by Chad Hanna's avatar Chad Hanna
Browse files

gstlal_ilwdify: new (temporary) program for ligolw compatability

parent d4f9b8cf
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@
dist_bin_SCRIPTS = \
gstlal_harmonic_mean_psd \
gstlal_mock_data_server \
gstlal_ilwdify \
gstlal_inspiral_treebank \
gstlal_inspiral_treebank_dag \
gstlal_inspiral_bankviz \
......
#!/usr/bin/env python
import sys
from ligo.lw import ligolw
from ligo.lw import lsctables
from ligo.lw import array
from ligo.lw import param
from ligo.lw import utils as ligolw_utils
from gstlal import ilwdify
class LIGOLWContentHandler(ligolw.LIGOLWContentHandler):
pass
lsctables.use_in(LIGOLWContentHandler)
param.use_in(LIGOLWContentHandler)
array.use_in(LIGOLWContentHandler)
fname = sys.argv[1]
xmldoc = ligolw_utils.load_filename(fname, verbose = True, contenthandler = LIGOLWContentHandler)
xmldoc = ilwdify.do_it_to(xmldoc)
ligolw_utils.write_filename(xmldoc, fname, gz = fname.endswith('gz'), verbose = True)
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