Skip to content

Commit d3d0c99

Browse files
authored
remove the future module (gwastro#2162)
* remove old INSTALL parts * remove future.y * update scipy requirements * update zpk to use scipy * update results to use python htmlparser * bump matplotlib requirements * no more future module
1 parent 36d0ac8 commit d3d0c99

8 files changed

+16
-1831
lines changed

INSTALL

+4-26
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,16 @@ PyCBC installation instructions
44
Prerequisites
55
-------------
66

7-
* Python 2.6 or 2.7
8-
Should be provided by the distribution.
9-
10-
* python-decorator >= 3.3
11-
Should be available in the distribution.
12-
13-
* argparse >= 1.2.0
14-
Should be available in the distribution
15-
16-
* Numpy >= 1.4.1 and Scipy >= 0.7.2
17-
Should be installable either via the distribution packaging system,
18-
pip or easy_install. Numpy >= 1.5.1 is required for GPU acceleration
19-
via CUDA due to a bug in older versions.
20-
217
* LALSuite
228
See https://www.lsc-group.phys.uwm.edu/daswg/docs/howto/lal-install.html
23-
for installation instructions. LALSuite must be configured with the
24-
--enable-swig-python option.
9+
for instructions to install through source, or simply install the pre-built
10+
version hosted on pypi using pip.
2511

2612
Installing PyCBC
2713
----------------
2814

29-
git clone https://github.com/ligo-cbc/pycbc.git
30-
cd pycbc
31-
python setup.py build
32-
python setup.py install --user
33-
python setup.py test
34-
35-
For installing system-wide, replace the 'setup.py install' command with
36-
sudo python setup.py install
37-
38-
15+
pip install lalsuite pycbc
16+
3917
Installing CUDA Python modules
4018
------------------------------
4119

bin/plotting/pycbc_banksim_plot_eff_fitting_factor

+2-5
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,8 @@ if opt.filter_injections:
8484

8585
fig = plt.figure()
8686
ax = fig.gca()
87-
try:
88-
cmap = plt.get_cmap('viridis')
89-
except ValueError:
90-
from pycbc.future import cmaps
91-
cmap = cmaps['viridis']
87+
cmap = plt.get_cmap('viridis')
88+
9289

9390
if not opt.log_colorbar:
9491
sctr = ax.scatter(m1, m2, c=eff_ff, cmap=cmap, edgecolors='none',

bin/plotting/pycbc_banksim_plot_fitting_factors

+2-5
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,8 @@ eta = m1*m2 / (mtot*mtot)
7575
effspin = (s1z*m1 + s2z*m2) / mtot
7676
curr_fp.close()
7777

78-
try:
79-
cmap = plt.get_cmap('magma')
80-
except ValueError:
81-
from pycbc.future import cmaps
82-
cmap = cmaps['magma']
78+
79+
cmap = plt.get_cmap('magma')
8380

8481
def adjust_axes(ax_instance):
8582
"""Adjust axes so that there is always a range of >= 0.1 on the plots."""

pycbc/filter/zpk.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424

2525
import numpy as np
2626

27-
from pycbc import future
28-
27+
from scipy.signal import zpk2sos, sosfilt
2928
from pycbc.types import TimeSeries
3029

3130
def filter_zpk(timeseries, z, p, k):
@@ -108,10 +107,10 @@ def filter_zpk(timeseries, z, p, k):
108107
k_zd = k * np.prod(fs - z) / np.prod(fs - p)
109108

110109
# get second-order sections
111-
sos = future.zpk2sos(z_zd, p_zd, k_zd)
110+
sos = zpk2sos(z_zd, p_zd, k_zd)
112111

113112
# filter
114-
filtered_data = future.sosfilt(sos, timeseries.numpy())
113+
filtered_data = sosfilt(sos, timeseries.numpy())
115114

116115
return TimeSeries(filtered_data, delta_t = timeseries.delta_t,
117116
dtype=timeseries.dtype,

0 commit comments

Comments
 (0)