Commit 4c8a21f2 authored by Chad Hanna's avatar Chad Hanna

gstlal_ilwdify: new (temporary) program for ligolw compatability

parent 271a758e
......@@ -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):
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)
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