diff --git a/bilby/__init__.py b/bilby/__init__.py index 4b6ac0f52bfae1798ca6bf338f92294c0a96606b..30e2531b5a51b892836461372a54cbf8c8907f58 100644 --- a/bilby/__init__.py +++ b/bilby/__init__.py @@ -16,7 +16,6 @@ https://lscsoft.docs.ligo.org/bilby/installation.html. """ -from __future__ import absolute_import import sys from . import core, gw, hyper diff --git a/bilby/core/__init__.py b/bilby/core/__init__.py index 3946f24a4339cc4fa456df4c53dd50bd2fde75c9..7446bd24f1a771ce015674d3e72c3803ea997c34 100644 --- a/bilby/core/__init__.py +++ b/bilby/core/__init__.py @@ -1,2 +1 @@ -from __future__ import absolute_import from . import grid, likelihood, prior, result, sampler, series, utils diff --git a/bilby/core/grid.py b/bilby/core/grid.py index 42fb58dd0f1f9cd46fd115027bbc95f67b0899a4..c469464bd7df9084ebf53cc3eca7b19fda86a789 100644 --- a/bilby/core/grid.py +++ b/bilby/core/grid.py @@ -1,5 +1,3 @@ -from __future__ import division - import numpy as np import os import json diff --git a/bilby/core/likelihood.py b/bilby/core/likelihood.py index 3441a1a6de5a295e90619b589644bc7135f24e5d..06438a21e364b9d07ef6952434e21a3678fff4e0 100644 --- a/bilby/core/likelihood.py +++ b/bilby/core/likelihood.py @@ -1,4 +1,3 @@ -from __future__ import division, print_function import copy import numpy as np diff --git a/bilby/core/prior/dict.py b/bilby/core/prior/dict.py index 3ec1a0593b44c6ea007febbd7c33ed11c021da49..3d4371a92943911f6e52b28b50299b351ed23437 100644 --- a/bilby/core/prior/dict.py +++ b/bilby/core/prior/dict.py @@ -3,7 +3,6 @@ from io import open as ioopen import json import os -from future.utils import iteritems from matplotlib.cbook import flatten import numpy as np @@ -185,7 +184,7 @@ class PriorDict(dict): def from_dictionary(self, dictionary): eval_dict = dict(inf=np.inf) - for key, val in iteritems(dictionary): + for key, val in dictionary.items(): if isinstance(val, Prior): continue elif isinstance(val, (int, float)): diff --git a/bilby/core/result.py b/bilby/core/result.py index 9964ee5caeaa25ee47fdc0430e3d80796384823a..e2855797a79e81be860a06376367dad7765d8766 100644 --- a/bilby/core/result.py +++ b/bilby/core/result.py @@ -1,5 +1,3 @@ -from __future__ import division - import inspect import os from collections import OrderedDict, namedtuple diff --git a/bilby/core/sampler/base_sampler.py b/bilby/core/sampler/base_sampler.py index fa05b4f83adbe59ff5c8444fc8d43f5ab26d722a..7d8d4b4dbc038df18b1393af01ae58e1b9db9041 100644 --- a/bilby/core/sampler/base_sampler.py +++ b/bilby/core/sampler/base_sampler.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import import datetime import distutils.dir_util import numpy as np diff --git a/bilby/core/sampler/cpnest.py b/bilby/core/sampler/cpnest.py index fa58e5d6603884b002cabc515999520695250c49..a1c1ab08768a326d741551e5d4896130a53fc63c 100644 --- a/bilby/core/sampler/cpnest.py +++ b/bilby/core/sampler/cpnest.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import import array import copy diff --git a/bilby/core/sampler/dynamic_dynesty.py b/bilby/core/sampler/dynamic_dynesty.py index 48d726e4aea958f4914ce4ea33a15608e5454b29..c2b143e106de2b4ec3db38abbcae23e480e70b6a 100644 --- a/bilby/core/sampler/dynamic_dynesty.py +++ b/bilby/core/sampler/dynamic_dynesty.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import import os import dill as pickle diff --git a/bilby/core/sampler/fake_sampler.py b/bilby/core/sampler/fake_sampler.py index 8033958ddbc043ca3ae03cfa9327a9789022736b..55015eef625e2189b70df3b48e8768c486799344 100644 --- a/bilby/core/sampler/fake_sampler.py +++ b/bilby/core/sampler/fake_sampler.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import import numpy as np from .base_sampler import Sampler diff --git a/bilby/core/sampler/nestle.py b/bilby/core/sampler/nestle.py index 73f88f1cbc2dd615736a0114b074efca2dceffc5..b366805598eccc212892acc9d946f4fd69bec0c3 100644 --- a/bilby/core/sampler/nestle.py +++ b/bilby/core/sampler/nestle.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import import numpy as np from pandas import DataFrame diff --git a/bilby/core/sampler/polychord.py b/bilby/core/sampler/polychord.py index 3c26821b470a27d35b484970ae6d7e079199ee54..22bcc7e3a92830ee90184ac0c9b19c310dbb3b4b 100644 --- a/bilby/core/sampler/polychord.py +++ b/bilby/core/sampler/polychord.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import import numpy as np diff --git a/bilby/core/sampler/ptemcee.py b/bilby/core/sampler/ptemcee.py index 4dc97a4aa03d8a5c69bf0aa2ac73bdb55c3a5984..84c95f2502dbb2efcd0790361bf56c352143cc30 100644 --- a/bilby/core/sampler/ptemcee.py +++ b/bilby/core/sampler/ptemcee.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, division, print_function import os import datetime diff --git a/bilby/core/sampler/ptmcmc.py b/bilby/core/sampler/ptmcmc.py index 3f90711057b4bfa392c6d7d1717929289dda2757..d27698aa7278a947bf5fd46639d93527339ff271 100644 --- a/bilby/core/sampler/ptmcmc.py +++ b/bilby/core/sampler/ptmcmc.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, print_function import glob import shutil diff --git a/bilby/core/sampler/pymc3.py b/bilby/core/sampler/pymc3.py index 73f5f3edb13aa9715a67b11b0a3a945667dbfefe..9c44b3a621a7e88baf1266dcf7898bc9b21037ed 100644 --- a/bilby/core/sampler/pymc3.py +++ b/bilby/core/sampler/pymc3.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, print_function from collections import OrderedDict from distutils.version import StrictVersion diff --git a/bilby/core/sampler/ultranest.py b/bilby/core/sampler/ultranest.py index 7e2cbcd6981060724b53355753c0e72173ead7b8..ffeb2e267d92a9ce069a29d080359840be6d91f0 100644 --- a/bilby/core/sampler/ultranest.py +++ b/bilby/core/sampler/ultranest.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import import datetime import distutils.dir_util diff --git a/bilby/core/utils.py b/bilby/core/utils.py index 8fc3431edc2c6d9e497196f8ce0f7fdc791348c7..3b590215545dbcbe1adade632a05712b8d1f6091 100644 --- a/bilby/core/utils.py +++ b/bilby/core/utils.py @@ -1,4 +1,3 @@ -from __future__ import division from distutils.spawn import find_executable import logging diff --git a/bilby/gw/likelihood.py b/bilby/gw/likelihood.py index 8a1086cca4bb37622bebeef6f2454e129b4d227a..76daadee557be754b35702e8d1ec70ade39d182f 100644 --- a/bilby/gw/likelihood.py +++ b/bilby/gw/likelihood.py @@ -1,4 +1,3 @@ -from __future__ import division import gc import os diff --git a/bilby/gw/result.py b/bilby/gw/result.py index 27f01c6fdfee9eb2a45be700cd3b296e0cf625f1..80d69f654c364dca37211ac1d16530054f9676e7 100644 --- a/bilby/gw/result.py +++ b/bilby/gw/result.py @@ -1,4 +1,3 @@ -from __future__ import division import json import pickle diff --git a/bilby/gw/sampler/__init__.py b/bilby/gw/sampler/__init__.py index 25ad2ca38576b83835854b025b36f3a73b6a1cb8..70a65589295895c739f91223e244878e12482aa9 100644 --- a/bilby/gw/sampler/__init__.py +++ b/bilby/gw/sampler/__init__.py @@ -1,2 +1 @@ -from __future__ import absolute_import from . import proposal diff --git a/bilby/gw/utils.py b/bilby/gw/utils.py index b89211066fce5eaf228a27ce30b62b3fcfdf5704..abdcfae40adac05190494934833285d4cbfc8f4f 100644 --- a/bilby/gw/utils.py +++ b/bilby/gw/utils.py @@ -1,4 +1,3 @@ -from __future__ import division import os import json from math import fmod diff --git a/bilby/hyper/likelihood.py b/bilby/hyper/likelihood.py index bc037be3cb4789c56a3fea8b79fe20d126b82539..25a1ad9abd5a442714c84fb51ef95771f6280918 100644 --- a/bilby/hyper/likelihood.py +++ b/bilby/hyper/likelihood.py @@ -1,4 +1,3 @@ -from __future__ import division, print_function import logging diff --git a/cli_bilby/__init__.py b/cli_bilby/__init__.py index c3961685ab8defd1a28f2a2a7bb3b74fcafa4d6b..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 --- a/cli_bilby/__init__.py +++ b/cli_bilby/__init__.py @@ -1 +0,0 @@ -from __future__ import absolute_import diff --git a/examples/core_examples/gaussian_example.py b/examples/core_examples/gaussian_example.py index d578961368bee967dc5ee51e7885745167a33d90..4555d825fd913493c6939269f714d01d81a675db 100644 --- a/examples/core_examples/gaussian_example.py +++ b/examples/core_examples/gaussian_example.py @@ -3,7 +3,6 @@ An example of how to use bilby to perform paramater estimation for non-gravitational wave data consisting of a Gaussian with a mean and variance """ -from __future__ import division import bilby import numpy as np diff --git a/examples/core_examples/grid_example.py b/examples/core_examples/grid_example.py index af38eb259aab5feda4e726bbec49397cde018e8f..29df64f96acccf753d9aafd50bbc92d9a7745c1b 100644 --- a/examples/core_examples/grid_example.py +++ b/examples/core_examples/grid_example.py @@ -5,7 +5,6 @@ non-gravitational wave data. In this case, fitting a linear function to data with background Gaussian noise """ -from __future__ import division import bilby import numpy as np import matplotlib.pyplot as plt diff --git a/examples/core_examples/hyper_parameter_example.py b/examples/core_examples/hyper_parameter_example.py index fb8060e4d1c5f405c13f582cd95600560eaabf7c..71526b68b85986420e5eef278d863baac5aeca95 100644 --- a/examples/core_examples/hyper_parameter_example.py +++ b/examples/core_examples/hyper_parameter_example.py @@ -2,7 +2,6 @@ """ An example of how to use bilby to perform parameter estimation for hyper params """ -from __future__ import division import numpy as np import matplotlib.pyplot as plt from bilby.core.likelihood import GaussianLikelihood diff --git a/examples/core_examples/linear_regression.py b/examples/core_examples/linear_regression.py index ca0c19af540e8f5b5d895deaff6edea788fa3dc8..7bb143b0b10252014408e40850c753a4bd18cab6 100644 --- a/examples/core_examples/linear_regression.py +++ b/examples/core_examples/linear_regression.py @@ -5,7 +5,6 @@ non-gravitational wave data. In this case, fitting a linear function to data with background Gaussian noise """ -from __future__ import division import bilby import numpy as np import matplotlib.pyplot as plt diff --git a/examples/core_examples/linear_regression_grid.py b/examples/core_examples/linear_regression_grid.py index 6549c860a3cc9ddb6862a0426c153894347a5682..ec0186015384d7c5055a8c108b164f8048cfb191 100644 --- a/examples/core_examples/linear_regression_grid.py +++ b/examples/core_examples/linear_regression_grid.py @@ -5,7 +5,6 @@ fitting a linear function to data with background Gaussian noise. This will compare the output of using a stochastic sampling method to evaluating the posterior on a grid. """ -from __future__ import division import numpy as np import matplotlib.pyplot as plt diff --git a/examples/core_examples/linear_regression_pymc3.py b/examples/core_examples/linear_regression_pymc3.py index eb98be1edd7a7092dec74fd4b2eaa4dc32997bbe..0f42da66ac5668ea2862f40cb11c47c89b3c74b7 100644 --- a/examples/core_examples/linear_regression_pymc3.py +++ b/examples/core_examples/linear_regression_pymc3.py @@ -5,7 +5,6 @@ non-gravitational wave data. In this case, fitting a linear function to data with background Gaussian noise """ -from __future__ import division import bilby import numpy as np import matplotlib.pyplot as plt diff --git a/examples/core_examples/linear_regression_pymc3_custom_likelihood.py b/examples/core_examples/linear_regression_pymc3_custom_likelihood.py index 4270e696891056c9638a6fd2084b0c99fc3daf58..31c951cb98ec73e8598420de153ee252c95a96df 100644 --- a/examples/core_examples/linear_regression_pymc3_custom_likelihood.py +++ b/examples/core_examples/linear_regression_pymc3_custom_likelihood.py @@ -8,7 +8,6 @@ would give equivalent results as using the pre-defined 'Gaussian Likelihood' """ -from __future__ import division import bilby import numpy as np import matplotlib.pyplot as plt diff --git a/examples/core_examples/linear_regression_unknown_noise.py b/examples/core_examples/linear_regression_unknown_noise.py index e4427c9e0b062a880327527dbfbdf7541a962261..d276dfa96bc5f8493c832e0032ddb5af1b7adc1c 100644 --- a/examples/core_examples/linear_regression_unknown_noise.py +++ b/examples/core_examples/linear_regression_unknown_noise.py @@ -5,7 +5,6 @@ non-gravitational wave data. In this case, fitting a linear function to data with background Gaussian noise with unknown variance. """ -from __future__ import division import bilby import numpy as np import matplotlib.pyplot as plt diff --git a/examples/core_examples/multidimensional_gaussian.py b/examples/core_examples/multidimensional_gaussian.py index c0078d50bb7e1e9b203b6b547b1822f8f46f8d87..327151ef400f264babe2d474d0ab93e70d87dd8c 100644 --- a/examples/core_examples/multidimensional_gaussian.py +++ b/examples/core_examples/multidimensional_gaussian.py @@ -3,7 +3,6 @@ Testing the recovery of a multi-dimensional Gaussian with zero mean and unit variance """ -from __future__ import division import bilby import numpy as np diff --git a/examples/core_examples/multivariate_gaussian_prior.py b/examples/core_examples/multivariate_gaussian_prior.py index 53d8f94e47ac41833bd536d2f596f3a78cc76e8d..93cfbd24c867b3132977bd9a21d272d8dcb51783 100644 --- a/examples/core_examples/multivariate_gaussian_prior.py +++ b/examples/core_examples/multivariate_gaussian_prior.py @@ -4,7 +4,6 @@ An example of how to use bilby with a (multi-modal) multivariate Gaussian prior distribution. """ -from __future__ import division import bilby import numpy as np from scipy import linalg, stats diff --git a/examples/core_examples/occam_factor_example.py b/examples/core_examples/occam_factor_example.py index 319b988c0d2704b9fa9aff3d867bed6ce702ed99..f442c58d640ca392e793cf61b00e2812e3c8e138 100644 --- a/examples/core_examples/occam_factor_example.py +++ b/examples/core_examples/occam_factor_example.py @@ -30,7 +30,6 @@ Note - the code uses a course 100-point estimation for speed, results can be improved by increasing this to say 500 or 1000. """ -from __future__ import division import bilby import numpy as np import matplotlib.pyplot as plt diff --git a/examples/core_examples/radioactive_decay.py b/examples/core_examples/radioactive_decay.py index aceabd156ff1a68bdbb4bf500d0718e6167241ee..3f6b7f052b51f34cb613a37708c3daebc199b90d 100644 --- a/examples/core_examples/radioactive_decay.py +++ b/examples/core_examples/radioactive_decay.py @@ -4,7 +4,6 @@ An example of how to use bilby to perform paramater estimation for non-gravitational wave data. In this case, fitting the half-life and initial radionuclide number for Polonium 214. """ -from __future__ import division import bilby import numpy as np import matplotlib.pyplot as plt diff --git a/examples/core_examples/starting_mcmc_chains_near_to_the_peak.py b/examples/core_examples/starting_mcmc_chains_near_to_the_peak.py index 3fcbf45d32dc9f381ceb7a8961233946c63dcb1e..478c414068acde720095525b613c53b4b9d32b6f 100644 --- a/examples/core_examples/starting_mcmc_chains_near_to_the_peak.py +++ b/examples/core_examples/starting_mcmc_chains_near_to_the_peak.py @@ -4,7 +4,6 @@ An example of using emcee, but starting the walkers off close to the peak (or any other arbitrary point). This is based off the linear_regression_with_unknown_noise.py example. """ -from __future__ import division import bilby import numpy as np import pandas as pd diff --git a/examples/gw_examples/data_examples/GW150914.py b/examples/gw_examples/data_examples/GW150914.py index d0fb0631b509889acbe5b10bfc345ff20965ee90..34356e2a3d8db0a09f3d425325840fbb42ab21b1 100755 --- a/examples/gw_examples/data_examples/GW150914.py +++ b/examples/gw_examples/data_examples/GW150914.py @@ -9,7 +9,6 @@ the LIGO Data Grid instead. [1] https://gwpy.github.io/docs/stable/timeseries/remote-access.html """ -from __future__ import division, print_function import bilby from gwpy.timeseries import TimeSeries diff --git a/examples/gw_examples/data_examples/GW150914_advanced.py b/examples/gw_examples/data_examples/GW150914_advanced.py index e6f27c3aadffe46f510e52cde3e3993b02425bc6..c22568a93b196386194f5cce6151465df3abc2d4 100755 --- a/examples/gw_examples/data_examples/GW150914_advanced.py +++ b/examples/gw_examples/data_examples/GW150914_advanced.py @@ -10,7 +10,6 @@ LIST OF AVAILABLE EVENTS: List of events in BILBY dict: run -> help(bilby.gw.utils.get_event_time(event)) """ -from __future__ import division, print_function import bilby from gwpy.timeseries import TimeSeries diff --git a/examples/gw_examples/data_examples/GW170817.py b/examples/gw_examples/data_examples/GW170817.py index c3e8d6c96f233f7ad575fa941b25fee6b6a02b65..4bcd2e7e5e88e50c729edc02a39b85b9978e2fa0 100644 --- a/examples/gw_examples/data_examples/GW170817.py +++ b/examples/gw_examples/data_examples/GW170817.py @@ -4,7 +4,6 @@ This tutorial includes advanced specifications for analysing binary neutron star event data. Here GW170817 is used as an example. """ -from __future__ import division, print_function import bilby outdir = 'outdir' diff --git a/examples/gw_examples/data_examples/get_LOSC_event_data.py b/examples/gw_examples/data_examples/get_LOSC_event_data.py index 9c7b314797480aa4f4f6df5b767144490a84ca19..ece59e10ed776a78350a7eb3a3ba3ad06549e816 100644 --- a/examples/gw_examples/data_examples/get_LOSC_event_data.py +++ b/examples/gw_examples/data_examples/get_LOSC_event_data.py @@ -7,7 +7,6 @@ $ python get_LOSC_event_data -e GW150914 """ -from __future__ import division import numpy as np import os import argparse diff --git a/examples/gw_examples/injection_examples/australian_detector.py b/examples/gw_examples/injection_examples/australian_detector.py index 0da60ef59d47a555fea8c266079ddbb12288b215..6b903a9fc0695a279ef777e0d0fa166aa7fae140 100644 --- a/examples/gw_examples/injection_examples/australian_detector.py +++ b/examples/gw_examples/injection_examples/australian_detector.py @@ -5,7 +5,6 @@ Tutorial to demonstrate a new interferometer We place a new instrument in Gingin, with an A+ sensitivity in a network of A+ interferometers at Hanford and Livingston """ -from __future__ import division, print_function import numpy as np diff --git a/examples/gw_examples/injection_examples/binary_neutron_star_example.py b/examples/gw_examples/injection_examples/binary_neutron_star_example.py index bbcce5925d88b7cfc6e227804ee3dd9327e666fc..e6aa18a9a47c9594f05a446d47d6294a31fc6032 100644 --- a/examples/gw_examples/injection_examples/binary_neutron_star_example.py +++ b/examples/gw_examples/injection_examples/binary_neutron_star_example.py @@ -8,7 +8,6 @@ and also estimates the tidal deformabilities using a uniform prior in both tidal deformabilities """ -from __future__ import division, print_function import numpy as np diff --git a/examples/gw_examples/injection_examples/bns_eos_example.py b/examples/gw_examples/injection_examples/bns_eos_example.py index b1e5e029b0d593616e472f15f98c27c9a400a798..d84a86a59e73b08fd0f6766c43bc6408918c9f52 100644 --- a/examples/gw_examples/injection_examples/bns_eos_example.py +++ b/examples/gw_examples/injection_examples/bns_eos_example.py @@ -8,7 +8,6 @@ and also estimates the tidal deformabilities using a uniform prior in both tidal deformabilities """ -from __future__ import division, print_function import numpy as np diff --git a/examples/gw_examples/injection_examples/calibration_example.py b/examples/gw_examples/injection_examples/calibration_example.py index ca58994696f4233ceb60d17bf500e144671e6c72..8b9556f48ca43a2419629cc1d4f8fdb1daa25b96 100644 --- a/examples/gw_examples/injection_examples/calibration_example.py +++ b/examples/gw_examples/injection_examples/calibration_example.py @@ -3,7 +3,6 @@ Tutorial to demonstrate running parameter estimation with calibration uncertainties included. """ -from __future__ import division, print_function import numpy as np import bilby diff --git a/examples/gw_examples/injection_examples/change_sampled_parameters.py b/examples/gw_examples/injection_examples/change_sampled_parameters.py index 9f432ef52910fd125b1930ea90420e7eae0b6245..4e0266d08b6290395d2a5e8dc47bdf0dc6ca9432 100644 --- a/examples/gw_examples/injection_examples/change_sampled_parameters.py +++ b/examples/gw_examples/injection_examples/change_sampled_parameters.py @@ -7,7 +7,6 @@ This example estimates the masses using a uniform prior in chirp mass, mass ratio and redshift. The cosmology is according to the Planck 2015 data release. """ -from __future__ import division, print_function import bilby import numpy as np diff --git a/examples/gw_examples/injection_examples/create_your_own_source_model.py b/examples/gw_examples/injection_examples/create_your_own_source_model.py index ded59e157ee098bd7c765dae01e0b5b55790d408..f755363f091a12f11df425ccaea3d7d7831090c2 100644 --- a/examples/gw_examples/injection_examples/create_your_own_source_model.py +++ b/examples/gw_examples/injection_examples/create_your_own_source_model.py @@ -2,7 +2,6 @@ """ A script to demonstrate how to use your own source model """ -from __future__ import division, print_function import bilby import numpy as np diff --git a/examples/gw_examples/injection_examples/custom_proposal_example.py b/examples/gw_examples/injection_examples/custom_proposal_example.py index afd85dace2ba9646388d0d5e1e19800679167010..2a19f4ee6944ff7aceff31591dad3c837ce0a73c 100644 --- a/examples/gw_examples/injection_examples/custom_proposal_example.py +++ b/examples/gw_examples/injection_examples/custom_proposal_example.py @@ -2,7 +2,6 @@ """ Tutorial for running cpnest with custom jump proposals. """ -from __future__ import division, print_function import numpy as np import bilby.gw.sampler.proposal diff --git a/examples/gw_examples/injection_examples/eccentric_inspiral.py b/examples/gw_examples/injection_examples/eccentric_inspiral.py index 8d3053f353fb769384f25a17c3b1d406860fd88e..88c3062e49e3c4514bfadf9a3a7d46ad0331dc75 100644 --- a/examples/gw_examples/injection_examples/eccentric_inspiral.py +++ b/examples/gw_examples/injection_examples/eccentric_inspiral.py @@ -10,7 +10,6 @@ Lower et al. (2018) -> arXiv:1806.05350. For a more comprehensive look at what goes on in each step, refer to the "basic_tutorial.py" example. """ -from __future__ import division import numpy as np import bilby diff --git a/examples/gw_examples/injection_examples/fake_sampler_example.py b/examples/gw_examples/injection_examples/fake_sampler_example.py index 63c2713737b17586a9c2d296837beec21fd83b43..e1e7d600d88be737405d12dcdd21be3d5fbcba90 100755 --- a/examples/gw_examples/injection_examples/fake_sampler_example.py +++ b/examples/gw_examples/injection_examples/fake_sampler_example.py @@ -2,7 +2,6 @@ """ Read ROQ posterior and calculate full likelihood at same parameter space points. """ -from __future__ import division, print_function import numpy as np import deepdish as dd diff --git a/examples/gw_examples/injection_examples/fast_tutorial.py b/examples/gw_examples/injection_examples/fast_tutorial.py index 89119eb59163292257bec63dce20e71686f4dd41..0f40818cc86b2fa7d3a647ca9930e596a03ecf4b 100644 --- a/examples/gw_examples/injection_examples/fast_tutorial.py +++ b/examples/gw_examples/injection_examples/fast_tutorial.py @@ -7,7 +7,6 @@ This example estimates the masses using a uniform prior in both component masses and distance using a uniform in comoving volume prior on luminosity distance between luminosity distances of 100Mpc and 5Gpc, the cosmology is Planck15. """ -from __future__ import division, print_function import numpy as np import bilby diff --git a/examples/gw_examples/injection_examples/how_to_specify_the_prior.py b/examples/gw_examples/injection_examples/how_to_specify_the_prior.py index 68081b4d2eddabec080e48005c6fc5536bb546e1..851a3aab37cfbc1ce915af5e80e104dddf4b3a80 100644 --- a/examples/gw_examples/injection_examples/how_to_specify_the_prior.py +++ b/examples/gw_examples/injection_examples/how_to_specify_the_prior.py @@ -3,7 +3,6 @@ Tutorial to demonstrate how to specify the prior distributions used for parameter estimation. """ -from __future__ import division, print_function import numpy as np import bilby diff --git a/examples/gw_examples/injection_examples/marginalized_likelihood.py b/examples/gw_examples/injection_examples/marginalized_likelihood.py index c6ab3362ca98a57a5a423c62c44f78ab54148493..c28efca13d4d9ddda064d4e6eef14c72b8086407 100644 --- a/examples/gw_examples/injection_examples/marginalized_likelihood.py +++ b/examples/gw_examples/injection_examples/marginalized_likelihood.py @@ -6,7 +6,6 @@ estimation on an injected signal using time, phase and distance marginalisation. We also demonstrate how the posterior distribution for the marginalised parameter can be recovered in post-processing. """ -from __future__ import division, print_function import bilby import numpy as np diff --git a/examples/gw_examples/injection_examples/non_tensor.py b/examples/gw_examples/injection_examples/non_tensor.py index 4b18f9648d8a98a6b9822325504090888b5d5cc1..6c44216954f92aab978cac1be612d3ebbc17b042 100644 --- a/examples/gw_examples/injection_examples/non_tensor.py +++ b/examples/gw_examples/injection_examples/non_tensor.py @@ -6,7 +6,6 @@ allowed in general relativity. We adapt the sine-Gaussian burst model to include vector polarizations with an unknown contribution from the vector modes. """ -from __future__ import division, print_function import bilby import numpy as np diff --git a/examples/gw_examples/injection_examples/plot_skymap.py b/examples/gw_examples/injection_examples/plot_skymap.py index 5d2a1ffaf22df70f40bc33b1d81c6127b0fab5a5..4c7ecb9a3e3abbaa4bab6099330b1332d5846909 100644 --- a/examples/gw_examples/injection_examples/plot_skymap.py +++ b/examples/gw_examples/injection_examples/plot_skymap.py @@ -3,7 +3,6 @@ Example script which produces posterior samples of ra and dec and generates a skymap """ -from __future__ import division, print_function import bilby duration = 4. diff --git a/examples/gw_examples/injection_examples/plot_time_domain_data.py b/examples/gw_examples/injection_examples/plot_time_domain_data.py index eee3c8557bd447714bd0fe9025f838928f9cd542..4e572e8a53a330a0be47a9bfc5f2b50b6879cd0a 100644 --- a/examples/gw_examples/injection_examples/plot_time_domain_data.py +++ b/examples/gw_examples/injection_examples/plot_time_domain_data.py @@ -1,7 +1,6 @@ #!/usr/bin/env python """ """ -from __future__ import division, print_function import numpy as np import bilby diff --git a/examples/gw_examples/injection_examples/roq_example.py b/examples/gw_examples/injection_examples/roq_example.py index 69bff31df6e1fd6413d69de64669d53f9ee91f36..9b8b9d97a6f011f962ff083c9f894e71d6dde2f6 100644 --- a/examples/gw_examples/injection_examples/roq_example.py +++ b/examples/gw_examples/injection_examples/roq_example.py @@ -8,7 +8,6 @@ This requires files specifying the appropriate basis weights. These aren't shipped with Bilby, but are available on LDG clusters and from the public repository https://git.ligo.org/lscsoft/ROQ_data. """ -from __future__ import division, print_function import numpy as np diff --git a/examples/gw_examples/injection_examples/sine_gaussian_example.py b/examples/gw_examples/injection_examples/sine_gaussian_example.py index 07ac1ff0b2a12f1fe446e3f08e1fc85f70783c1f..d40cb68e89e37a28409c8a292dad4176117a9c20 100644 --- a/examples/gw_examples/injection_examples/sine_gaussian_example.py +++ b/examples/gw_examples/injection_examples/sine_gaussian_example.py @@ -3,7 +3,6 @@ Tutorial to demonstrate running parameter estimation on a sine gaussian injected signal. """ -from __future__ import division, print_function import bilby import numpy as np diff --git a/examples/gw_examples/injection_examples/standard_15d_cbc_tutorial.py b/examples/gw_examples/injection_examples/standard_15d_cbc_tutorial.py index 822c11b1002f1bdb1021e5d0d7daef57dc16a259..7eef1b4291c18da127bdcf0494e7227baf7f763c 100644 --- a/examples/gw_examples/injection_examples/standard_15d_cbc_tutorial.py +++ b/examples/gw_examples/injection_examples/standard_15d_cbc_tutorial.py @@ -4,7 +4,6 @@ Tutorial to demonstrate running parameter estimation on a full 15 parameter space for an injected cbc signal. This is the standard injection analysis script one can modify for the study of injected CBC events. """ -from __future__ import division, print_function import numpy as np import bilby diff --git a/examples/gw_examples/injection_examples/using_gwin.py b/examples/gw_examples/injection_examples/using_gwin.py index 4d9c583ac6fa35f81b038232c566d2fbada5ad8a..de68a82886ed8f262d0f5bef5ddf98629be13b8d 100644 --- a/examples/gw_examples/injection_examples/using_gwin.py +++ b/examples/gw_examples/injection_examples/using_gwin.py @@ -15,7 +15,6 @@ of the model. So, in the following, we only create priors for the parameters to be searched over. """ -from __future__ import division, print_function import numpy as np import bilby diff --git a/examples/gw_examples/supernova_example/supernova_example.py b/examples/gw_examples/supernova_example/supernova_example.py index 507c4e4ed1c4c4907b7b9f153649d0634897c953..b5de9f40775a91f27dce75a2a3fe549d6ca4a2c8 100644 --- a/examples/gw_examples/supernova_example/supernova_example.py +++ b/examples/gw_examples/supernova_example/supernova_example.py @@ -7,7 +7,6 @@ supernova waveforms. The first few PCs are then linearly combined with a scale factor. (See https://arxiv.org/pdf/1202.3256.pdf) """ -from __future__ import division, print_function import numpy as np import bilby diff --git a/requirements.txt b/requirements.txt index bf8b8babcb5c7247c38367537e5b45f7fd479fbd..8512031dd5b0ad28e7712d55475fc557b20d712e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ -future dynesty emcee corner diff --git a/setup.py b/setup.py index 0882ade9b33e1477ff5ffccad7ee8a22be36fecc..79fe30cfee90473c7a0a0bfe73ebddd838fad655 100644 --- a/setup.py +++ b/setup.py @@ -87,7 +87,6 @@ setup(name='bilby', 'bilby': [version_file]}, python_requires='>=3.5', install_requires=[ - 'future', 'dynesty>=1.0.0', 'emcee', 'corner', diff --git a/test/core/prior/prior_test.py b/test/core/prior/prior_test.py index dc6ee205e8f283a6684becec44f40c5024e9bc98..2bbbc2bf1e87535ed56a8d47bff35ec57c2c9b4b 100644 --- a/test/core/prior/prior_test.py +++ b/test/core/prior/prior_test.py @@ -1,4 +1,3 @@ -from __future__ import absolute_import, division import bilby import unittest import numpy as np