From 34b542fb18fefc3961099cdd85c661d1f5dbca94 Mon Sep 17 00:00:00 2001
From: Colm Talbot <colm.talbot@ligo.org>
Date: Tue, 7 May 2019 11:52:21 +1000
Subject: [PATCH] standardise internal imports to be relative

---
 bilby/core/sampler/proposal.py      |  2 +-
 bilby/gw/detector/__init__.py       |  4 ++--
 bilby/gw/detector/geometry.py       |  2 +-
 bilby/gw/detector/interferometer.py | 12 ++++++------
 bilby/gw/detector/networks.py       |  6 +++---
 bilby/gw/detector/psd.py            |  4 ++--
 bilby/gw/detector/strain_data.py    | 10 +++++-----
 bilby/gw/sampler/proposal.py        |  2 +-
 bilby/hyper/model.py                |  2 +-
 9 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/bilby/core/sampler/proposal.py b/bilby/core/sampler/proposal.py
index 496869274..f889f9453 100644
--- a/bilby/core/sampler/proposal.py
+++ b/bilby/core/sampler/proposal.py
@@ -4,7 +4,7 @@ from inspect import isclass
 import numpy as np
 import random
 
-from bilby.core.prior import Uniform
+from ..prior import Uniform
 
 
 class Sample(OrderedDict):
diff --git a/bilby/gw/detector/__init__.py b/bilby/gw/detector/__init__.py
index 6b5b2449f..50b9f7a34 100644
--- a/bilby/gw/detector/__init__.py
+++ b/bilby/gw/detector/__init__.py
@@ -1,4 +1,4 @@
-from bilby.gw import conversion
+from ..conversion import convert_to_lal_binary_black_hole_parameters
 from .calibration import *
 from .interferometer import *
 from .networks import *
@@ -64,7 +64,7 @@ def inject_signal_into_gwpy_timeseries(
     ifo = get_empty_interferometer(det)
     ifo.strain_data.set_from_gwpy_timeseries(data)
 
-    parameters_check, _ = conversion.convert_to_lal_binary_black_hole_parameters(parameters)
+    parameters_check, _ = convert_to_lal_binary_black_hole_parameters(parameters)
     safe_time = get_safe_signal_duration(**parameters_check)
     if data.duration.value < safe_time:
         ValueError(
diff --git a/bilby/gw/detector/geometry.py b/bilby/gw/detector/geometry.py
index 0bd29e332..319645187 100644
--- a/bilby/gw/detector/geometry.py
+++ b/bilby/gw/detector/geometry.py
@@ -1,6 +1,6 @@
 import numpy as np
 
-from bilby.gw import utils as gwutils
+from .. import utils as gwutils
 
 
 class InterferometerGeometry(object):
diff --git a/bilby/gw/detector/interferometer.py b/bilby/gw/detector/interferometer.py
index c7b44a316..d059d4df5 100644
--- a/bilby/gw/detector/interferometer.py
+++ b/bilby/gw/detector/interferometer.py
@@ -4,12 +4,12 @@ import sys
 import numpy as np
 from matplotlib import pyplot as plt
 
-from bilby.core import utils
-from bilby.core.utils import logger
-from bilby.gw import utils as gwutils
-from bilby.gw.detector.calibration import Recalibrate
-from bilby.gw.detector.geometry import InterferometerGeometry
-from bilby.gw.utils import PropertyAccessor
+from ...core import utils
+from ...core.utils import logger
+from .. import utils as gwutils
+from ..utils import PropertyAccessor
+from .calibration import Recalibrate
+from .geometry import InterferometerGeometry
 from .strain_data import InterferometerStrainData
 
 try:
diff --git a/bilby/gw/detector/networks.py b/bilby/gw/detector/networks.py
index 9a0cc7025..53883cc9c 100644
--- a/bilby/gw/detector/networks.py
+++ b/bilby/gw/detector/networks.py
@@ -3,9 +3,9 @@ import sys
 
 import numpy as np
 
-from bilby.core import utils
-from bilby.core.utils import logger
-from bilby.gw import utils as gwutils
+from ...core import utils
+from ...core.utils import logger
+from .. import utils as gwutils
 from .interferometer import Interferometer
 from .psd import PowerSpectralDensity
 from .strain_data import InterferometerStrainData
diff --git a/bilby/gw/detector/psd.py b/bilby/gw/detector/psd.py
index a0d30d6a4..0267dce30 100644
--- a/bilby/gw/detector/psd.py
+++ b/bilby/gw/detector/psd.py
@@ -3,8 +3,8 @@ import os
 import numpy as np
 from scipy.interpolate import interp1d
 
-from bilby.core import utils
-from bilby.core.utils import logger
+from ...core import utils
+from ...core.utils import logger
 from .strain_data import InterferometerStrainData
 
 
diff --git a/bilby/gw/detector/strain_data.py b/bilby/gw/detector/strain_data.py
index 83f063ce7..84f763337 100644
--- a/bilby/gw/detector/strain_data.py
+++ b/bilby/gw/detector/strain_data.py
@@ -1,11 +1,11 @@
 import numpy as np
 from scipy.signal.windows import tukey
 
-from bilby.core import utils
-from bilby.core.series import CoupledTimeAndFrequencySeries
-from bilby.core.utils import logger
-from bilby.gw import utils as gwutils
-from bilby.gw.utils import PropertyAccessor
+from ...core import utils
+from ...core.series import CoupledTimeAndFrequencySeries
+from ...core.utils import logger
+from .. import utils as gwutils
+from ..utils import PropertyAccessor
 
 try:
     import gwpy
diff --git a/bilby/gw/sampler/proposal.py b/bilby/gw/sampler/proposal.py
index 328fd98a8..79e1ec92c 100644
--- a/bilby/gw/sampler/proposal.py
+++ b/bilby/gw/sampler/proposal.py
@@ -2,7 +2,7 @@ import random
 
 import numpy as np
 
-from bilby.core.sampler.proposal import JumpProposal
+from ...core.sampler.proposal import JumpProposal
 
 
 class SkyLocationWanderJump(JumpProposal):
diff --git a/bilby/hyper/model.py b/bilby/hyper/model.py
index a5d2c6699..82b0d8fa5 100644
--- a/bilby/hyper/model.py
+++ b/bilby/hyper/model.py
@@ -1,4 +1,4 @@
-from bilby.core.utils import infer_parameters_from_function
+from ..core.utils import infer_parameters_from_function
 
 
 class Model(object):
-- 
GitLab