Commit eb1fa544 authored by Moritz Huebner's avatar Moritz Huebner

Merge branch 'remove-future' into 'master'

remove future imports

See merge request lscsoft/bilby!911
parents 84f35d58 0cd48ebe
......@@ -16,7 +16,6 @@ https://lscsoft.docs.ligo.org/bilby/installation.html.
"""
from __future__ import absolute_import
import sys
from . import core, gw, hyper
......
from __future__ import absolute_import
from . import grid, likelihood, prior, result, sampler, series, utils
from __future__ import division
import numpy as np
import os
import json
......
from __future__ import division, print_function
import copy
import numpy as np
......
......@@ -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)):
......
from __future__ import division
import inspect
import os
from collections import OrderedDict, namedtuple
......
from __future__ import absolute_import
import datetime
import distutils.dir_util
import numpy as np
......
from __future__ import absolute_import
import array
import copy
......
from __future__ import absolute_import
import os
import dill as pickle
......
from __future__ import absolute_import
import numpy as np
from .base_sampler import Sampler
......
from __future__ import absolute_import
import numpy as np
from pandas import DataFrame
......
from __future__ import absolute_import
import numpy as np
......
from __future__ import absolute_import, division, print_function
import os
import datetime
......
from __future__ import absolute_import, print_function
import glob
import shutil
......
from __future__ import absolute_import, print_function
from collections import OrderedDict
from distutils.version import StrictVersion
......
from __future__ import absolute_import
import datetime
import distutils.dir_util
......
from __future__ import division
from distutils.spawn import find_executable
import logging
......
from __future__ import division
import gc
import os
......
from __future__ import division
import json
import pickle
......
from __future__ import absolute_import
from . import proposal
from __future__ import division
import os
import json
from math import fmod
......
from __future__ import division, print_function
import logging
......
from __future__ import absolute_import
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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'
......
......@@ -7,7 +7,6 @@ $ python get_LOSC_event_data -e GW150914
"""
from __future__ import division
import numpy as np
import os
import argparse
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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.
......
#!/usr/bin/env python
"""
"""
from __future__ import division, print_function
import numpy as np
import bilby
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -87,7 +87,6 @@ setup(name='bilby',
'bilby': [version_file]},
python_requires='>=3.5',
install_requires=[
'future',
'dynesty>=1.0.0',
'emcee',
'corner',
......
from __future__ import absolute_import, division
import bilby
import unittest
import numpy as np
......
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