Skip to content
Snippets Groups Projects
Commit 4a0551c2 authored by Kipp Cannon's avatar Kipp Cannon
Browse files

inspiral_intrinsics.py: add fall-back for missing PPoly

parent 6b187c86
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,22 @@ import h5py
import math
import numpy
import os
#from scipy.interpolate import PPoly
try:
from scipy.interpolate import PPoly
except ImportError:
# argh, scipy too old
# FIXME: delete this when we can rely on LDG sites having a
# new-enough scipy
from lal.rate import IrregularBins
class PPoly(object):
def __init__(self, c, x):
self.intervals = IrregularBins(x)
self.coeffs = c
self.x0 = x
def __call__(self, x):
i = self.intervals[x]
return numpy.poly1d(self.coeffs[:,i].squeeze())(x - self.x0[i]),
from gstlal import stats as gstlalstats
......
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