diff --git a/src/dxtbx/command_line/detector_superpose.py b/src/dxtbx/command_line/detector_superpose.py index 67eee579c..e2e6f4ccd 100644 --- a/src/dxtbx/command_line/detector_superpose.py +++ b/src/dxtbx/command_line/detector_superpose.py @@ -3,16 +3,15 @@ import math import sys -from serialtbx.detector import iterate_detector_at_level +import dials.util +from dials.util.options import OptionParser from libtbx.phil import parse from libtbx.test_utils import approx_equal from scitbx.array_family import flex from scitbx.math.superpose import least_squares_fit from scitbx.matrix import col - -import dials.util -from dials.util.options import OptionParser +from serialtbx.detector import iterate_detector_at_level import dxtbx.util from dxtbx.model.experiment_list import ExperimentListFactory diff --git a/src/dxtbx/command_line/image2pickle.py b/src/dxtbx/command_line/image2pickle.py index c3d6d6a38..62838ca42 100644 --- a/src/dxtbx/command_line/image2pickle.py +++ b/src/dxtbx/command_line/image2pickle.py @@ -12,10 +12,10 @@ import sys import numpy as np -import serialtbx.detector.cspad -import serialtbx.util import libtbx.option_parser +import serialtbx.detector.cspad +import serialtbx.util from libtbx import easy_pickle from libtbx.utils import Usage from scitbx.array_family import flex diff --git a/src/dxtbx/dxtbx_model_ext.pyi b/src/dxtbx/dxtbx_model_ext.pyi index b7f7010e8..fac8393b7 100644 --- a/src/dxtbx/dxtbx_model_ext.pyi +++ b/src/dxtbx/dxtbx_model_ext.pyi @@ -22,8 +22,10 @@ from scitbx.array_family import shared as flex_shared # Attempt to use the stub typing for flex-inheritance from scitbx.array_family.flex import FlexPlain -from dxtbx_model_ext import Probe # type: ignore -from dxtbx_model_ext import ExperimentType +from dxtbx_model_ext import ( + ExperimentType, + Probe, # type: ignore +) # TypeVar for the set of Experiment models that can be joint-accepted # - profile, imageset and scalingmodel are handled as 'object' diff --git a/src/dxtbx/format/FormatNexusJungfrauExt.py b/src/dxtbx/format/FormatNexusJungfrauExt.py index a9b2e82d1..55d90e60e 100644 --- a/src/dxtbx/format/FormatNexusJungfrauExt.py +++ b/src/dxtbx/format/FormatNexusJungfrauExt.py @@ -4,9 +4,9 @@ import h5py import numpy as np -from serialtbx.detector.jungfrau import pad_stacked_format from scitbx.array_family import flex +from serialtbx.detector.jungfrau import pad_stacked_format from dxtbx.format.FormatNexus import FormatNexus from dxtbx.format.nexus import h5str diff --git a/src/dxtbx/format/FormatPYmultitile.py b/src/dxtbx/format/FormatPYmultitile.py index fb19e4623..3ff8153d8 100644 --- a/src/dxtbx/format/FormatPYmultitile.py +++ b/src/dxtbx/format/FormatPYmultitile.py @@ -5,10 +5,9 @@ from calendar import timegm from time import strptime -from serialtbx.detector.legacy_metrology.cspad_detector import CSPadDetector - from iotbx.detectors.npy import image_dict_to_unicode from scitbx.matrix import col +from serialtbx.detector.legacy_metrology.cspad_detector import CSPadDetector from dxtbx.format.FormatPY import FormatPY from dxtbx.model import Detector diff --git a/src/dxtbx/format/FormatXTCCspad.py b/src/dxtbx/format/FormatXTCCspad.py index a69a987bf..cb72009f4 100644 --- a/src/dxtbx/format/FormatXTCCspad.py +++ b/src/dxtbx/format/FormatXTCCspad.py @@ -3,14 +3,14 @@ import sys import numpy as np -import serialtbx.detector.cspad -from serialtbx.detector import cspad -from serialtbx.detector.xtc import env_distance +import serialtbx.detector.cspad from cctbx.eltbx import attenuation_coefficient from libtbx.phil import parse from scitbx.array_family import flex from scitbx.matrix import col +from serialtbx.detector import cspad +from serialtbx.detector.xtc import env_distance from dxtbx.format.FormatXTC import FormatXTC, locator_str from dxtbx.model import Detector, ParallaxCorrectedPxMmStrategy diff --git a/src/dxtbx/format/FormatXTCEpix.py b/src/dxtbx/format/FormatXTCEpix.py index f3cae2a10..bea3bcf44 100644 --- a/src/dxtbx/format/FormatXTCEpix.py +++ b/src/dxtbx/format/FormatXTCEpix.py @@ -62,6 +62,7 @@ def get_detector(self, index=None): def _detector(self, index=None): from PSCalib.SegGeometryStore import sgs + from serialtbx.detector.xtc import basis_from_geo run = self.get_run_from_index(index) diff --git a/src/dxtbx/format/FormatXTCJungfrau.py b/src/dxtbx/format/FormatXTCJungfrau.py index 56f8a8f69..7956f57ef 100644 --- a/src/dxtbx/format/FormatXTCJungfrau.py +++ b/src/dxtbx/format/FormatXTCJungfrau.py @@ -102,6 +102,7 @@ def get_detector(self, index=None): def _detector(self, index=None): from PSCalib.SegGeometryStore import sgs + from serialtbx.detector.xtc import basis_from_geo run = self.get_run_from_index(index) diff --git a/src/dxtbx/format/FormatXTCRayonix.py b/src/dxtbx/format/FormatXTCRayonix.py index a85578f37..b2426ffa9 100644 --- a/src/dxtbx/format/FormatXTCRayonix.py +++ b/src/dxtbx/format/FormatXTCRayonix.py @@ -15,10 +15,9 @@ raise psana = None -from serialtbx.detector import rayonix - from libtbx.phil import parse from scitbx.array_family import flex +from serialtbx.detector import rayonix from dxtbx.format.FormatXTC import FormatXTC, locator_str diff --git a/src/dxtbx/format/cbf_writer.py b/src/dxtbx/format/cbf_writer.py index 514d1651e..595538ecd 100644 --- a/src/dxtbx/format/cbf_writer.py +++ b/src/dxtbx/format/cbf_writer.py @@ -13,9 +13,9 @@ import sys import pycbf -from serialtbx.detector import basis from scitbx.array_family import flex +from serialtbx.detector import basis import dxtbx.format.Registry from dxtbx.format.FormatCBFMultiTile import cbf_wrapper diff --git a/src/dxtbx/format/nxmx_writer.py b/src/dxtbx/format/nxmx_writer.py index 88d893493..fa82fedf6 100644 --- a/src/dxtbx/format/nxmx_writer.py +++ b/src/dxtbx/format/nxmx_writer.py @@ -12,7 +12,7 @@ import h5py import numpy as np -from serialtbx.detector import basis +from dials.util.options import ArgumentParser, flatten_experiments from cctbx import factor_ev_angstrom from libtbx import easy_pickle @@ -20,8 +20,7 @@ from libtbx.utils import Sorry from scitbx import matrix from scitbx.array_family import flex - -from dials.util.options import ArgumentParser, flatten_experiments +from serialtbx.detector import basis from dxtbx import flumpy from dxtbx.format.FormatCBFMultiTile import angle_and_axis