Skip to content

Commit

Permalink
Remaining conversions to absolute imports. Closes #292
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthchirp committed Jan 25, 2017
1 parent 8e582c0 commit eb446d6
Show file tree
Hide file tree
Showing 220 changed files with 272 additions and 278 deletions.
4 changes: 2 additions & 2 deletions algorithms/background/glm/__init__.py
@@ -1,4 +1,4 @@
from __future__ import division
from __future__ import absolute_import, division
from dials.array_family import flex # import dependency
from dials_algorithms_background_glm_ext import *
from algorithm import BackgroundAlgorithm
from dials.algorithms.background.glm.algorithm import BackgroundAlgorithm
2 changes: 1 addition & 1 deletion algorithms/background/glm/algorithm.py
Expand Up @@ -9,7 +9,7 @@
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.

from __future__ import division
from __future__ import absolute_import, division

class BackgroundAlgorithm(object):
''' Class to do background subtraction. '''
Expand Down
4 changes: 2 additions & 2 deletions algorithms/background/median/__init__.py
@@ -1,4 +1,4 @@
from __future__ import division
from __future__ import absolute_import, division
from dials.array_family import flex # import dependency
from dials_algorithms_background_median_ext import *
from algorithm import BackgroundAlgorithm
from dials.algorithms.background.median.algorithm import BackgroundAlgorithm
2 changes: 1 addition & 1 deletion algorithms/background/median/algorithm.py
Expand Up @@ -9,7 +9,7 @@
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.

from __future__ import division
from __future__ import absolute_import, division

class BackgroundAlgorithm(object):
''' Class to do background subtraction. '''
Expand Down
6 changes: 3 additions & 3 deletions algorithms/background_lookup/__init__.py
@@ -1,3 +1,3 @@
from __future__ import division
from background_and_gain import *
from detector_noise import *
from __future__ import absolute_import, division
from dials.algorithms.background_lookup.background_and_gain import *
from dials.algorithms.background_lookup.detector_noise import *
2 changes: 1 addition & 1 deletion algorithms/background_lookup/background_and_gain.py
Expand Up @@ -9,7 +9,7 @@
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.

from __future__ import division
from __future__ import absolute_import, division

class ComputeBackgroundAndGain(object):
'''Class to calculate the gain map of a detector.'''
Expand Down
2 changes: 1 addition & 1 deletion algorithms/background_lookup/detector_noise.py
Expand Up @@ -9,7 +9,7 @@
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.

from __future__ import division
from __future__ import absolute_import, division

class ComputeDetectorNoise(object):
'''Calculate the detector noise. Estimate this by calculating the mean
Expand Down
4 changes: 2 additions & 2 deletions algorithms/centroid/__init__.py
@@ -1,3 +1,3 @@
from __future__ import division
from __future__ import absolute_import, division
from dials.array_family import flex # import dependency
from centroid_px_to_mm import *
from dials.algorithms.centroid.centroid_px_to_mm import *
2 changes: 1 addition & 1 deletion algorithms/centroid/centroid_px_to_mm.py
Expand Up @@ -8,7 +8,7 @@
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.

from __future__ import division
from __future__ import absolute_import, division

def centroid_px_to_mm(detector, scan, position, variance, sd_error):
'''Convenience function to calculate centroid in mm/rad from px'''
Expand Down
2 changes: 1 addition & 1 deletion algorithms/centroid/simple/__init__.py
@@ -1,4 +1,4 @@
from __future__ import division
from __future__ import absolute_import, division
from dxtbx import model
from dials.array_family import flex
from dials_algorithms_centroid_simple_ext import *
2 changes: 1 addition & 1 deletion algorithms/centroid/simple/algorithm.py
Expand Up @@ -9,7 +9,7 @@
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.

from __future__ import division
from __future__ import absolute_import, division

class Algorithm(object):
'''
Expand Down
2 changes: 1 addition & 1 deletion algorithms/filtering/__init__.py
@@ -1,2 +1,2 @@
from __future__ import division
from __future__ import absolute_import, division
from dials_algorithms_filter_ext import *
2 changes: 1 addition & 1 deletion algorithms/image/centroid/__init__.py
@@ -1,3 +1,3 @@
from __future__ import division
from __future__ import absolute_import, division
from scitbx.array_family import flex # import dependency
from dials_algorithms_image_centroid_ext import *
2 changes: 1 addition & 1 deletion algorithms/image/connected_components/__init__.py
@@ -1,3 +1,3 @@
from __future__ import division
from __future__ import absolute_import, division
from scitbx.array_family import flex # import dependency
from dials_algorithms_image_connected_components_ext import *
2 changes: 1 addition & 1 deletion algorithms/image/fill_holes/__init__.py
@@ -1,3 +1,3 @@
from __future__ import division
from __future__ import absolute_import, division
from scitbx.array_family import flex # import dependency
from dials_algorithms_image_fill_holes_ext import *
2 changes: 1 addition & 1 deletion algorithms/image/filter/__init__.py
@@ -1,3 +1,3 @@
from __future__ import division
from __future__ import absolute_import, division
from scitbx.array_family import flex # import dependency
from dials_algorithms_image_filter_ext import *
2 changes: 1 addition & 1 deletion algorithms/indexing/__init__.py
@@ -1,4 +1,4 @@
from __future__ import division
from __future__ import absolute_import, division

from cctbx.array_family import flex
from dials_algorithms_indexing_ext import *
Expand Down
2 changes: 1 addition & 1 deletion algorithms/indexing/compare_orientation_matrices.py
@@ -1,4 +1,4 @@
from __future__ import division
from __future__ import absolute_import, division
from scitbx.math import r3_rotation_axis_and_angle_from_matrix
from scitbx import matrix
import math
Expand Down
2 changes: 1 addition & 1 deletion algorithms/indexing/fft1d.py
Expand Up @@ -10,7 +10,7 @@
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.

from __future__ import division
from __future__ import absolute_import, division

from scitbx.array_family import flex
from dials.algorithms.indexing.indexer import indexer_base
Expand Down
2 changes: 1 addition & 1 deletion algorithms/indexing/fft3d.py
Expand Up @@ -10,7 +10,7 @@
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.

from __future__ import division
from __future__ import absolute_import, division
import math

import libtbx
Expand Down
2 changes: 1 addition & 1 deletion algorithms/indexing/indexer.py
Expand Up @@ -10,7 +10,7 @@
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.

from __future__ import division
from __future__ import absolute_import, division
import math
import logging
logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion algorithms/indexing/known_orientation.py
Expand Up @@ -10,7 +10,7 @@
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.

from __future__ import division
from __future__ import absolute_import, division

from dials.algorithms.indexing.indexer import indexer_base
from dxtbx.model.experiment.experiment_list import Experiment, ExperimentList
Expand Down
2 changes: 1 addition & 1 deletion algorithms/indexing/nave_parameters.py
Expand Up @@ -2,7 +2,7 @@
# -*- mode: python; coding: utf-8; indent-tabs-mode: nil; python-indent: 2 -*-
#

from __future__ import division
from __future__ import absolute_import, division
from scitbx.matrix import sqr,col
from dials.array_family import flex
import math
Expand Down
2 changes: 1 addition & 1 deletion algorithms/indexing/nearest_neighbor.py
@@ -1,4 +1,4 @@
from __future__ import division
from __future__ import absolute_import, division
import math

class neighbor_analysis(object):
Expand Down
2 changes: 1 addition & 1 deletion algorithms/indexing/real_space_grid_search.py
Expand Up @@ -10,7 +10,7 @@
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.

from __future__ import division
from __future__ import absolute_import, division
import math
import logging
logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion algorithms/indexing/refinement.py
@@ -1,4 +1,4 @@
from __future__ import division
from __future__ import absolute_import, division
#!/usr/bin/env python
# -*- mode: python; coding: utf-8; indent-tabs-mode: nil; python-indent: 2 -*-
#
Expand Down
2 changes: 1 addition & 1 deletion algorithms/indexing/stills_indexer.py
Expand Up @@ -2,7 +2,7 @@
# -*- mode: python; coding: utf-8; indent-tabs-mode: nil; python-indent: 2 -*-
#

from __future__ import division
from __future__ import absolute_import, division
import logging
logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion algorithms/indexing/symmetry.py
@@ -1,4 +1,4 @@
from __future__ import division
from __future__ import absolute_import, division
import copy
import logging
import math
Expand Down
4 changes: 2 additions & 2 deletions algorithms/integration/__init__.py
@@ -1,7 +1,7 @@
from __future__ import division
from __future__ import absolute_import, division
import boost.python
from cctbx import sgtbx # import dependency
from dials.array_family import flex # import dependency
from dials.model import data # import dependency
from dials_algorithms_integration_ext import *
from integrator_stills import *
from dials.algorithms.integration.integrator_stills import *
2 changes: 1 addition & 1 deletion algorithms/integration/filtering.py
Expand Up @@ -7,7 +7,7 @@
#
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.
from __future__ import division
from __future__ import absolute_import, division
from iotbx.phil import parse

# The phil scope
Expand Down
2 changes: 1 addition & 1 deletion algorithms/integration/fit/__init__.py
@@ -1,3 +1,3 @@
from __future__ import division
from __future__ import absolute_import, division
from dials.array_family import flex # import dependency
from dials_algorithms_integration_fit_ext import *
2 changes: 1 addition & 1 deletion algorithms/integration/image_integrator.py
Expand Up @@ -9,7 +9,7 @@
# included in the root directory of this package.


from __future__ import division
from __future__ import absolute_import, division

import logging
logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion algorithms/integration/integrator.py
Expand Up @@ -8,7 +8,7 @@
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.

from __future__ import division
from __future__ import absolute_import, division
from dials_algorithms_integration_integrator_ext import *
from dials.algorithms.integration.processor import Processor3D
from dials.algorithms.integration.processor import ProcessorFlat3D
Expand Down
2 changes: 1 addition & 1 deletion algorithms/integration/integrator_stills.py
Expand Up @@ -8,7 +8,7 @@
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.

from __future__ import division
from __future__ import absolute_import, division


class ReflectionBlockIntegratorStills(object):
Expand Down
2 changes: 1 addition & 1 deletion algorithms/integration/processor.py
Expand Up @@ -8,7 +8,7 @@
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.

from __future__ import division
from __future__ import absolute_import, division
import logging
logger = logging.getLogger(__name__)
from dials_algorithms_integration_integrator_ext import *
Expand Down
2 changes: 1 addition & 1 deletion algorithms/integration/report.py
Expand Up @@ -7,7 +7,7 @@
#
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.
from __future__ import division
from __future__ import absolute_import, division
from dials.array_family import flex
from dials.array_family.flex import Binner
from dials.util.report import Report, Table, Array
Expand Down
4 changes: 2 additions & 2 deletions algorithms/integration/sum/__init__.py
@@ -1,4 +1,4 @@
from __future__ import division
from __future__ import absolute_import, division
from dials.array_family import flex # import dependency
from dials_algorithms_integration_sum_ext import *
from algorithm import IntegrationAlgorithm
from dials.algorithms.integration.sum.algorithm import IntegrationAlgorithm
2 changes: 1 addition & 1 deletion algorithms/integration/sum/algorithm.py
Expand Up @@ -8,7 +8,7 @@
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.

from __future__ import division
from __future__ import absolute_import, division

class IntegrationAlgorithm(object):
'''A class to perform 3D summation integration'''
Expand Down
2 changes: 1 addition & 1 deletion algorithms/integration/validation.py
Expand Up @@ -8,7 +8,7 @@
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.

from __future__ import division
from __future__ import absolute_import, division


class ValidatedMultiExpProfileModeller(object):
Expand Down
2 changes: 1 addition & 1 deletion algorithms/polygon/__init__.py
@@ -1,4 +1,4 @@
from __future__ import division
from __future__ import absolute_import, division
from scitbx.array_family import flex # import dependency
from dials_algorithms_polygon_ext import *

Expand Down
2 changes: 1 addition & 1 deletion algorithms/polygon/clip/__init__.py
@@ -1,3 +1,3 @@
from __future__ import division
from __future__ import absolute_import, division
from scitbx.array_family import flex # import dependency
from dials_algorithms_polygon_clip_ext import *
2 changes: 1 addition & 1 deletion algorithms/polygon/spatial_interpolation.py
@@ -1,4 +1,4 @@
from __future__ import division
from __future__ import absolute_import, division
from scitbx.array_family import *
from dials_algorithms_polygon_ext import *
from dials_algorithms_polygon_spatial_interpolation_ext import *
2 changes: 1 addition & 1 deletion algorithms/profile_model/factory.py
Expand Up @@ -7,7 +7,7 @@
#
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.
from __future__ import division
from __future__ import absolute_import, division

def generate_phil_scope():
'''
Expand Down
6 changes: 3 additions & 3 deletions algorithms/profile_model/gaussian_rs/__init__.py
@@ -1,10 +1,10 @@
from __future__ import division
from __future__ import absolute_import, division
from dials.array_family import flex # import dependency
from dials.algorithms.profile_model import modeller # import dependency
from dials_algorithms_profile_model_gaussian_rs_ext import *

from model import phil_scope # implicit dependency
from model import Model # implicit dependency
from dials.algorithms.profile_model.gaussian_rs.model import phil_scope # implicit dependency
from dials.algorithms.profile_model.gaussian_rs.model import Model # implicit dependency


def BBoxCalculator(crystal, beam, detector, goniometer, scan, delta_b, delta_m):
Expand Down
2 changes: 1 addition & 1 deletion algorithms/profile_model/gaussian_rs/calculator.py
Expand Up @@ -16,7 +16,7 @@
# FIXME Should maybe be scan varying
# FIXME Don't know how XDS calculated the n_sigma

from __future__ import division
from __future__ import absolute_import, division

import logging
logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion algorithms/profile_model/gaussian_rs/model.py
Expand Up @@ -8,7 +8,7 @@
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.

from __future__ import division
from __future__ import absolute_import, division
from libtbx.phil import parse
from dials.model.experiment.profile import ProfileModelIface

Expand Down
2 changes: 1 addition & 1 deletion algorithms/profile_model/gaussian_rs/transform/__init__.py
@@ -1,2 +1,2 @@
from __future__ import division
from __future__ import absolute_import, division
from dials_algorithms_profile_model_gaussian_rs_transform_ext import *
2 changes: 1 addition & 1 deletion algorithms/profile_model/modeller/__init__.py
@@ -1,3 +1,3 @@
from __future__ import division
from __future__ import absolute_import, division
from dials.array_family import flex # import dependency
from dials_algorithms_profile_model_modeller_ext import *
5 changes: 2 additions & 3 deletions algorithms/refinement/__init__.py
@@ -1,3 +1,2 @@
from __future__ import division
from refiner import Refiner # import dependency
from refiner import RefinerFactory # import dependency
from __future__ import absolute_import, division
from dials.algorithms.refinement.refiner import Refiner, RefinerFactory # import dependency
2 changes: 1 addition & 1 deletion algorithms/refinement/analysis/centroid_analysis.py
Expand Up @@ -10,7 +10,7 @@
"""Analysis of centroid residuals for determining suitable refinement and
outlier rejection parameters automatically"""

from __future__ import division
from __future__ import absolute_import, division
from math import pi
from dials.array_family import flex
from scitbx.math.periodogram import Periodogram
Expand Down
2 changes: 1 addition & 1 deletion algorithms/refinement/analysis/tst_vs_R.py
Expand Up @@ -9,7 +9,7 @@
#
"""Compare Periodogram with R's spec.pgram"""

from __future__ import division
from __future__ import absolute_import, division
try:
import rpy2.robjects as robjects
except ImportError as e:
Expand Down
2 changes: 1 addition & 1 deletion algorithms/refinement/engine.py
Expand Up @@ -11,7 +11,7 @@
LevenbergMarquardtIterations, GaussNewtonIterations, SimpleLBFGS and LBFGScurvs
are the current concrete implementations"""

from __future__ import division
from __future__ import absolute_import, division
import logging
logger = logging.getLogger(__name__)

Expand Down

0 comments on commit eb446d6

Please sign in to comment.