diff --git a/gstlal-burst/python/excesspower/__init__.py b/gstlal-burst/python/excesspower/__init__.py index b5b1ac6278900c2c44d5b7f913eb79030dee7ce0..df2a7c6bffde24fa931883a365e4861cfd42b4f6 100644 --- a/gstlal-burst/python/excesspower/__init__.py +++ b/gstlal-burst/python/excesspower/__init__.py @@ -24,13 +24,9 @@ from optparse import OptionParser, OptionGroup import ConfigParser from ConfigParser import SafeConfigParser -from pylal import datatypes as laltypes - -from glue.ligolw import ligolw +import lal from glue.ligolw import utils as ligolw_utils -from pylal.series import read_psd_xmldoc - from parts import EPHandler # @@ -194,10 +190,7 @@ def process_options(options, gw_data_source_opts, pipeline, mainloop): if cfg.has_option("cache", "reference-psd"): psdfile = cfg.get("cache", "reference-psd") try: - #FIXME: This will continue to complain about the ContentHandler, but - # the parsing fails if provided with one. - #handler.psd = read_psd_xmldoc(ligolw_utils.load_filename(psdfile, contenthandler = ligolw.LIGOLWContentHandler))[handler.inst] - handler.psd = read_psd_xmldoc(ligolw_utils.load_filename(psdfile))[handler.inst] + handler.psd = lal.series.read_psd_xmldoc(ligolw_utils.load_filename(psdfile, contenthandler = lal.series.PSDContentHandler))[handler.inst] print "Reference PSD for instrument %s from file %s loaded" % (handler.inst, psdfile) # Reference PSD disables caching (since we already have it) handler.cache_psd = None diff --git a/gstlal-inspiral/bin/gstlal_inspiral b/gstlal-inspiral/bin/gstlal_inspiral index ff511dba5dcb3507a2f6e80e68426d0da91836f0..dec224cbf9374f95337422f8559e6642e03ea1da 100644 --- a/gstlal-inspiral/bin/gstlal_inspiral +++ b/gstlal-inspiral/bin/gstlal_inspiral @@ -198,7 +198,6 @@ from glue.ligolw import ligolw from glue.ligolw import lsctables from glue.ligolw import utils as ligolw_utils from glue.ligolw.utils import segments as ligolw_segments -from pylal import series as lalseries from gstlal import bottle from gstlal import datasource from gstlal import lloidparts @@ -546,7 +545,7 @@ else: if options.reference_psd is not None: - psd = lalseries.read_psd_xmldoc(ligolw_utils.load_filename(options.reference_psd, verbose = options.verbose, contenthandler = lalseries.LIGOLWContentHandler)) + psd = lal.series.read_psd_xmldoc(ligolw_utils.load_filename(options.reference_psd, verbose = options.verbose, contenthandler = lal.series.PSDContentHandler)) else: psd = dict((instrument, None) for instrument in detectors.channel_dict) diff --git a/gstlal-inspiral/bin/gstlal_inspiral_create_prior_diststats b/gstlal-inspiral/bin/gstlal_inspiral_create_prior_diststats index 09352d0e5a7b0c39b44f37766e966603ba4f205f..60b0e36409fb009790d34067e3e5b8f68499ca2b 100755 --- a/gstlal-inspiral/bin/gstlal_inspiral_create_prior_diststats +++ b/gstlal-inspiral/bin/gstlal_inspiral_create_prior_diststats @@ -44,6 +44,9 @@ from optparse import OptionParser import numpy +import lal + + from glue import iterutils from glue.ligolw import ligolw from glue.ligolw import utils as ligolw_utils @@ -51,7 +54,6 @@ from glue.ligolw.utils import process as ligolw_process from glue.text_progress_bar import ProgressBar -from pylal import series as lalseries from pylal import rate @@ -159,7 +161,7 @@ if options.synthesize_injection_count > 0: for n, filename in enumerate(filenames, 1): if options.verbose: print >>sys.stderr, "%d/%d:" % (n, len(filenames)), - psd = lalseries.read_psd_xmldoc(ligolw_utils.load_filename(filename, contenthandler = lalseries.LIGOLWContentHandler, verbose = options.verbose)) + psd = lal.series.read_psd_xmldoc(ligolw_utils.load_filename(filename, contenthandler = lal.series.PSDContentHandler, verbose = options.verbose)) for m1, m2 in options.horizon_distance_masses: horizon_distances = dict((instrument, (0. if instrument not in psd else reference_psd.horizon_distance(psd[instrument], m1, m2, 8., options.horizon_distance_flow))) for instrument in options.instrument) if options.verbose: diff --git a/gstlal-inspiral/bin/gstlal_inspiral_lvalert_psd_plotter b/gstlal-inspiral/bin/gstlal_inspiral_lvalert_psd_plotter index 04396ac113ff28e7dc41990686463c9a03518bc7..ca62b241ec943a6be8322bbc11c515aba3006615 100755 --- a/gstlal-inspiral/bin/gstlal_inspiral_lvalert_psd_plotter +++ b/gstlal-inspiral/bin/gstlal_inspiral_lvalert_psd_plotter @@ -45,22 +45,13 @@ import urlparse import json -from glue.ligolw import ligolw -from glue.ligolw import array as ligolw_array -from glue.ligolw import param as ligolw_param -from glue.ligolw import lsctables +import lal + + from glue.ligolw import utils as ligolw_utils from gstlal import lvalert_helper from gstlal import plotpsd from ligo.gracedb import rest as gracedb -from pylal import series as lal_series - - -class LIGOLWContentHandler(ligolw.LIGOLWContentHandler): - pass -ligolw_array.use_in(LIGOLWContentHandler) -ligolw_param.use_in(LIGOLWContentHandler) -lsctables.use_in(LIGOLWContentHandler) plotpsd.matplotlib.rcParams.update({ @@ -90,7 +81,7 @@ def get_psds(gracedb_client, graceid, filename = "psd.xml.gz", ignore_404 = Fals response = lvalert_helper.get_filename(gracedb_client, graceid, filename = filename, ignore_404 = ignore_404) if response is None: return None - return lal_series.read_psd_xmldoc(ligolw_utils.load_fileobj(response, contenthandler = LIGOLWContentHandler)[0]) + return lal.series.read_psd_xmldoc(ligolw_utils.load_fileobj(response, contenthandler = lal.series.PSDContentHandler)[0]) # diff --git a/gstlal-inspiral/bin/gstlal_inspiral_pipe b/gstlal-inspiral/bin/gstlal_inspiral_pipe index 8610f220c31db9781f150b296213d9adfae3c338..d3809276194d67859e6c963371255f8bcf0f9173 100755 --- a/gstlal-inspiral/bin/gstlal_inspiral_pipe +++ b/gstlal-inspiral/bin/gstlal_inspiral_pipe @@ -73,28 +73,24 @@ import itertools ############################################################################## # import the modules we need to build the pipeline +import lal from glue import iterutils from glue import pipeline from glue.lal import Cache, CacheEntry from glue import segments from glue.ligolw import ligolw -from glue.ligolw import array as ligolw_array from glue.ligolw import lsctables -from glue.ligolw import param as ligolw_param import glue.ligolw.utils as ligolw_utils import glue.ligolw.utils.segments as ligolw_segments from optparse import OptionParser from gstlal import inspiral, inspiral_pipe from gstlal import dagparts as gstlaldagparts -from pylal import series as lalseries import numpy from gstlal import datasource class LIGOLWContentHandler(ligolw.LIGOLWContentHandler): pass -ligolw_array.use_in(LIGOLWContentHandler) lsctables.use_in(LIGOLWContentHandler) -ligolw_param.use_in(LIGOLWContentHandler) # @@ -837,7 +833,7 @@ if options.reference_psd is None: ) else: - ref_psd = lalseries.read_psd_xmldoc(ligolw_utils.load_filename(options.reference_psd, verbose = options.verbose, contenthandler = LIGOLWContentHandler)) + ref_psd = lal.series.read_psd_xmldoc(ligolw_utils.load_filename(options.reference_psd, verbose = options.verbose, contenthandler = lal.series.PSDContentHandler)) # NOTE: compute just the SNR pdf cache here, set other features to 0 # NOTE: This will likely result in downstream codes needing to compute diff --git a/gstlal-inspiral/bin/gstlal_svd_bank b/gstlal-inspiral/bin/gstlal_svd_bank index 4b1fb50bffb99d256312fdf847d764a1925b39f2..160a14dcce9c1a7acf6c350ac20ab101ff04e94d 100755 --- a/gstlal-inspiral/bin/gstlal_svd_bank +++ b/gstlal-inspiral/bin/gstlal_svd_bank @@ -33,15 +33,13 @@ from optparse import OptionParser import uuid +import lal from glue.lal import CacheEntry -from glue.ligolw import ligolw -from glue.ligolw import array as ligolw_array -from glue.ligolw import param as ligolw_param from glue.ligolw import utils as ligolw_utils -from pylal import series as lalseries from gstlal import svd_bank from gstlal.far import ThincaCoincParamsDistributions + ## @file gstlal_svd_bank # This program will create svd bank files; see gstlal_svd_bank for more information # @@ -91,13 +89,6 @@ from gstlal.far import ThincaCoincParamsDistributions # @image html svd.png - -class LIGOLWContentHandler(ligolw.LIGOLWContentHandler): - pass -ligolw_array.use_in(LIGOLWContentHandler) -ligolw_param.use_in(LIGOLWContentHandler) - - # # # ============================================================================= @@ -163,7 +154,7 @@ if options.snr_threshold != ThincaCoincParamsDistributions.snr_min: # ============================================================================= # -psd = lalseries.read_psd_xmldoc(ligolw_utils.load_filename(options.reference_psd, verbose=options.verbose, contenthandler=LIGOLWContentHandler)) +psd = lal.series.read_psd_xmldoc(ligolw_utils.load_filename(options.reference_psd, verbose=options.verbose, contenthandler=lal.series.PSDContentHandler)) svd_bank.write_bank( options.write_svd_bank, diff --git a/gstlal-inspiral/python/lloidparts.py b/gstlal-inspiral/python/lloidparts.py index e385222dcd8e0ea8a95cc6ac0f5e59de0eb9a200..adf44681692db9352e7f521fe38a811f50c3c537 100644 --- a/gstlal-inspiral/python/lloidparts.py +++ b/gstlal-inspiral/python/lloidparts.py @@ -95,7 +95,6 @@ from gstlal import pipeparts from gstlal import simplehandler import lal from lal import LIGOTimeGPS -from pylal import series as lalseries # @@ -550,7 +549,7 @@ class Handler(simplehandler.Handler): return outstr def gen_psd_xmldoc(self): - xmldoc = lalseries.make_psd_xmldoc(self.psds) + xmldoc = lal.series.make_psd_xmldoc(self.psds) process = ligolw_process.register_to_xmldoc(xmldoc, "gstlal_inspiral", {}) ligolw_process.set_process_end_time(process) return xmldoc diff --git a/gstlal-inspiral/python/llweb.py b/gstlal-inspiral/python/llweb.py index d8f6f06d99bf33844b084a4b330664edca06aabe..508605ee0b906cb889ec8fb95ea11cdbced3c82c 100644 --- a/gstlal-inspiral/python/llweb.py +++ b/gstlal-inspiral/python/llweb.py @@ -41,6 +41,7 @@ import sys import cgi import cgitb +cgitb.enable() import os import bisect import math @@ -60,26 +61,15 @@ import time import StringIO import base64 import urlparse -from gstlal import reference_psd + +import lal from glue.ligolw import ligolw -from glue.ligolw import array as ligolw_array -from glue.ligolw import lsctables -from glue.ligolw import param as ligolw_param from glue.ligolw import utils as ligolw_utils -from lal import GPSTimeNow -from pylal import series as lalseries from gstlal import far -cgitb.enable() - from gstlal import plotpsd from gstlal import plotfar from gstlal import plotsegments -class LIGOLWContentHandler(ligolw.LIGOLWContentHandler): - pass -ligolw_array.use_in(LIGOLWContentHandler) -ligolw_param.use_in(LIGOLWContentHandler) -lsctables.use_in(LIGOLWContentHandler) def ceil10(x): return 10**math.ceil(math.log10(x)) @@ -223,7 +213,7 @@ class GstlalWebSummary(object): fname = "%s/%s/%s" % (self.directory, id, datatype) if datatype == "psds": try: - self.found[datatype][id] = lalseries.read_psd_xmldoc(ligolw_utils.load_url("%s.xml" % fname, contenthandler = LIGOLWContentHandler)) + self.found[datatype][id] = lal.series.read_psd_xmldoc(ligolw_utils.load_url("%s.xml" % fname, contenthandler = lal.series.PSDContentHandler)) except KeyError: self.missed[datatype][id] = {} elif datatype == "likelihood": @@ -522,7 +512,7 @@ class GstlalWebSummary(object): likelihood, nu, nu = self.found["likelihood"][id] # FIXME dont hardcode IFOs instruments = (u"H1",u"L1") - timenow = GPSTimeNow() + timenow = lal.GPSTimeNow() horizon_distances = {} for ifo in instruments: horizon_distances[ifo] = likelihood.horizon_history[ifo][timenow] diff --git a/gstlal-inspiral/python/svd_bank.py b/gstlal-inspiral/python/svd_bank.py index a5ce0bacc6980ff1852353c6cf2460069b1aa574..906e0f1c80a33fb0c20d912df4561c832fe583db 100644 --- a/gstlal-inspiral/python/svd_bank.py +++ b/gstlal-inspiral/python/svd_bank.py @@ -43,6 +43,8 @@ import numpy import sys +import lal + from glue.ligolw import ligolw from glue.ligolw import lsctables from glue.ligolw import array as ligolw_array @@ -50,7 +52,6 @@ from glue.ligolw import param as ligolw_param from glue.ligolw import utils as ligolw_utils from glue.ligolw import types as ligolw_types from glue.ligolw.utils import process as ligolw_process -from pylal import series Attributes = ligolw.sax.xmlreader.AttributesImpl @@ -332,7 +333,7 @@ def write_bank(filename, banks, cliplefts = None, cliprights = None, contenthand # FIXME in principle this could be different for each bank included in # this file, but we only put one here if write_psd: - series.make_psd_xmldoc({bank.sngl_inspiral_table[0].ifo: bank.processed_psd}, lw) + lal.series.make_psd_xmldoc({bank.sngl_inspiral_table[0].ifo: bank.processed_psd}, lw) # add top level LIGO_LW to document xmldoc.appendChild(lw) diff --git a/gstlal-ugly/bin/gstlal_inspiral_plot_efficiency b/gstlal-ugly/bin/gstlal_inspiral_plot_efficiency index fedcc3c28ec5ed635f6ac49551bcfe58b8b62903..3f62cab73e432d8c3005515ac2032d04396da39a 100755 --- a/gstlal-ugly/bin/gstlal_inspiral_plot_efficiency +++ b/gstlal-ugly/bin/gstlal_inspiral_plot_efficiency @@ -13,15 +13,11 @@ sqlite3.enable_callback_tracebacks(True) import sys from optparse import OptionParser -from glue.ligolw import ligolw -from glue.ligolw import array -from glue.ligolw import param -array.use_in(ligolw.LIGOLWContentHandler) -param.use_in(ligolw.LIGOLWContentHandler) -from glue.ligolw import utils +import lal +from glue.ligolw import utils as ligolw_utils from pylal import rate -from pylal import series as lalseries from pylal import imr_utils + import matplotlib matplotlib.use('Agg') goldenratio = 2 / (1 + 5**.5) @@ -55,7 +51,7 @@ def compute_horizon_interpolator(psd_files, verbose = False): horizons = dict( (s, []) for s in sites) times = dict( (s, []) for s in sites) for f in psd_files: - psds = lalseries.read_psd_xmldoc(utils.load_filename(f, verbose = verbose, contenthandler = ligolw.LIGOLWContentHandler)) + psds = lal.series.read_psd_xmldoc(ligolw_utils.load_filename(f, verbose = verbose, contenthandler = lal.series.PSDContentHandler)) for ifo, psd in psds.items(): if psd is not None: times[ifo].append(int(psd.epoch)) diff --git a/gstlal/bin/gstlal_fake_frames b/gstlal/bin/gstlal_fake_frames index aa02132c1a50c7ae0ffe9d04e3034a0b18581f0b..9028e554a1eaa3f9c590b48075980654416b8592 100755 --- a/gstlal/bin/gstlal_fake_frames +++ b/gstlal/bin/gstlal_fake_frames @@ -16,9 +16,9 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +import numpy from optparse import OptionParser import os -import numpy import sys import gi @@ -27,22 +27,14 @@ from gi.repository import GObject, Gst GObject.threads_init() Gst.init(None) +import lal + from gstlal import pipeparts from gstlal import reference_psd from gstlal import simplehandler from gstlal import datasource from gstlal import multirate_datasource -from glue.ligolw import ligolw -from glue.ligolw import array as ligolw_array -from glue.ligolw import param as ligolw_param from glue.ligolw import utils as ligolw_utils -from pylal.datatypes import LIGOTimeGPS -from pylal import series as lalseries - -class LIGOLWContentHandler(ligolw.LIGOLWContentHandler): - pass -ligolw_array.use_in(LIGOLWContentHandler) -ligolw_param.use_in(LIGOLWContentHandler) ## @file gstlal_fake_frames # This program will make fake data in a variety of ways; see gstlal_fake_frames for help and usage @@ -275,7 +267,7 @@ if options.shift is not None: if options.whiten_reference_psd: ## If whitening read the PSD - wpsd = lalseries.read_psd_xmldoc(ligolw_utils.load_filename(options.whiten_reference_psd, verbose = options.verbose, contenthandler = LIGOLWContentHandler))[instrument] + wpsd = lal.series.read_psd_xmldoc(ligolw_utils.load_filename(options.whiten_reference_psd, verbose = options.verbose, contenthandler = lal.series.PSDContentHandler))[instrument] else: ## else set wpsd to None wpsd = None @@ -296,7 +288,7 @@ else: if options.color_psd: ## read coloring psd file and convert to an FIR filter - rpsd = lalseries.read_psd_xmldoc(ligolw_utils.load_filename(options.color_psd, verbose = options.verbose, contenthandler = LIGOLWContentHandler))[instrument] + rpsd = lal.series.read_psd_xmldoc(ligolw_utils.load_filename(options.color_psd, verbose = options.verbose, contenthandler = lal.series.PSDContentHandler))[instrument] ## Calculate the maximum sample rate max_sample = int(round(1.0 / rpsd.deltaF * options.sample_rate / 2.0)) + 1 diff --git a/gstlal/bin/gstlal_play b/gstlal/bin/gstlal_play index b9d387cb7331e04cf2a02a79b56c377e73188ceb..e698b2c2d62ef911957290ac77909715b9a56a5b 100755 --- a/gstlal/bin/gstlal_play +++ b/gstlal/bin/gstlal_play @@ -26,21 +26,14 @@ from gi.repository import GObject, Gst GObject.threads_init() Gst.init(None) -from pylal import series as lalseries -from glue.ligolw import ligolw -from glue.ligolw import array -from glue.ligolw import param -from glue.ligolw import lsctables -array.use_in(ligolw.LIGOLWContentHandler) -param.use_in(ligolw.LIGOLWContentHandler) -lsctables.use_in(ligolw.LIGOLWContentHandler) -from glue.ligolw import utils +import lal + +from glue.ligolw import utils as ligolw_utils from gstlal import datasource from gstlal import multirate_datasource from gstlal import pipeparts from gstlal import simplehandler from glue.ligolw.utils import segments as ligolw_segments -from pylal import series as lalseries ## @file gstlal_play # This program will play data in a variety of ways; See gstlal_play for help and usage. @@ -193,7 +186,7 @@ gw_data_source_info = datasource.GWDataSourceInfo(options) instrument, = gw_data_source_info.channel_dict if options.reference_psd is not None: - psd = lalseries.read_psd_xmldoc(utils.load_filename(options.reference_psd, verbose = options.verbose, contenthandler = ligolw.LIGOLWContentHandler))[instrument] + psd = lal.series.read_psd_xmldoc(ligolw_utils.load_filename(options.reference_psd, verbose = options.verbose, contenthandler = lal.series.PSDContentHandler))[instrument] else: psd = None diff --git a/gstlal/bin/gstlal_plot_psd b/gstlal/bin/gstlal_plot_psd index dbbf8a3ee4655e3146cc5e434c5b9ca33fde8b4b..5e5b4c6a3d56ac96f7842ffb8256fdc4f30131c8 100755 --- a/gstlal/bin/gstlal_plot_psd +++ b/gstlal/bin/gstlal_plot_psd @@ -21,13 +21,8 @@ import matplotlib matplotlib.use('Agg') from matplotlib import pyplot import numpy -from glue.ligolw import ligolw -from glue.ligolw import array -from glue.ligolw import param -array.use_in(ligolw.LIGOLWContentHandler) -param.use_in(ligolw.LIGOLWContentHandler) -from glue.ligolw import utils -from pylal import series as lalseries +import lal +from glue.ligolw import utils as ligolw_utils from gstlal import reference_psd ## @file @@ -53,7 +48,7 @@ outname = sys.argv[1] minpsd = [] for fname in sys.argv[2:]: - psds = lalseries.read_psd_xmldoc(utils.load_filename(fname, verbose = True, contenthandler = ligolw.LIGOLWContentHandler)) + psds = lal.series.read_psd_xmldoc(ligolw_utils.load_filename(fname, verbose = True, contenthandler = lal.series.PSDContentHandler)) for k,v in psds.items(): # compute horizon up to 90% of nyquist to avoid roll off h = reference_psd.horizon_distance(v, 1.4, 1.4, 8, 10, len(v.data) * v.deltaF * 0.90) diff --git a/gstlal/bin/gstlal_plot_psd_horizon b/gstlal/bin/gstlal_plot_psd_horizon index 6540c7d2f1a3f97697106c09150b68217e517da1..9ec557753160ebc85ef138f5711bd521b64c94e8 100755 --- a/gstlal/bin/gstlal_plot_psd_horizon +++ b/gstlal/bin/gstlal_plot_psd_horizon @@ -21,14 +21,9 @@ import matplotlib matplotlib.use('Agg') from matplotlib import pyplot import numpy -from glue.ligolw import ligolw -from glue.ligolw import array -from glue.ligolw import param -array.use_in(ligolw.LIGOLWContentHandler) -param.use_in(ligolw.LIGOLWContentHandler) -from glue.ligolw import utils +import lal +from glue.ligolw import utils as ligolw_utils from gstlal import reference_psd -from pylal import series as lalseries ## @file # A program to plot the horizon distance as a function of time from various psd estimates; See gstlal_plot_psd_horizon for usage. @@ -53,7 +48,7 @@ colors = {"H1":"r", "H2":"b", "L1":"g", "V1":"m", "H1H2":"c", "E1":"b", "E2":"r" horizons = dict((k, []) for k in colors) times = dict((k, []) for k in colors) for f in sys.argv[2:]: - psds = lalseries.read_psd_xmldoc(utils.load_filename(f, verbose = True, contenthandler = ligolw.LIGOLWContentHandler)) + psds = lal.series.read_psd_xmldoc(ligolw_utils.load_filename(f, verbose = True, contenthandler = lal.series.PSDContentHandler)) for ifo, psd in psds.items(): if psd is not None: times[ifo].append(int(psd.epoch)) diff --git a/gstlal/bin/gstlal_psd_polyfit b/gstlal/bin/gstlal_psd_polyfit index 2667ce77801080e8269798d25162a3e4571a1c94..442435ed1d1446df66506e7bc40d4bdc558b4905 100755 --- a/gstlal/bin/gstlal_psd_polyfit +++ b/gstlal/bin/gstlal_psd_polyfit @@ -19,15 +19,10 @@ import numpy import scipy import sys +import lal from gstlal import reference_psd from optparse import OptionParser -from glue.ligolw import ligolw -from glue.ligolw import array -from glue.ligolw import param -array.use_in(ligolw.LIGOLWContentHandler) -param.use_in(ligolw.LIGOLWContentHandler) -from glue.ligolw import utils -from pylal import series as lalseries +from glue.ligolw import utils as ligolw_utils ## @file # A program to fit a PSD to a polynomial @@ -61,7 +56,7 @@ parser.add_option("--high-fit-freq", type = float, default = 6500, help = "Set t options, filenames = parser.parse_args() -psds = lalseries.read_psd_xmldoc(utils.load_filename(filenames[0], verbose = True, contenthandler = ligolw.LIGOLWContentHandler)) +psds = lal.series.read_psd_xmldoc(ligolw_utils.load_filename(filenames[0], verbose = True, contenthandler = lal.series.PSDContentHandler)) # FIXME Don't assume all psds have same resolution psd = psds.values()[0] diff --git a/gstlal/python/reference_psd.py b/gstlal/python/reference_psd.py index f75a448c5c87f0ecaf94921ac3bbb56bafec6edc..d29e07aaf8ed3608eb8a91691a8c096593c82a23 100644 --- a/gstlal/python/reference_psd.py +++ b/gstlal/python/reference_psd.py @@ -47,7 +47,6 @@ Gst.init(None) from glue.ligolw import utils import lal -from pylal import series as lalseries from gstlal import datasource @@ -198,7 +197,7 @@ def write_psd_fileobj(fileobj, psddict, gz = False, trap_signals = None): Wrapper around make_psd_xmldoc() to write the XML document directly to a Python file object. """ - utils.write_fileobj(lalseries.make_psd_xmldoc(psddict), fileobj, gz = gz, trap_signals = trap_signals) + utils.write_fileobj(lal.series.make_psd_xmldoc(psddict), fileobj, gz = gz, trap_signals = trap_signals) def write_psd(filename, psddict, verbose = False, trap_signals = None): @@ -206,7 +205,7 @@ def write_psd(filename, psddict, verbose = False, trap_signals = None): Wrapper around make_psd_xmldoc() to write the XML document directly to a named file. """ - utils.write_filename(lalseries.make_psd_xmldoc(psddict), filename, gz = (filename or "stdout").endswith(".gz"), verbose = verbose, trap_signals = trap_signals) + utils.write_filename(lal.series.make_psd_xmldoc(psddict), filename, gz = (filename or "stdout").endswith(".gz"), verbose = verbose, trap_signals = trap_signals) #