Ejemplo n.º 1
0
    def setUpClass(cls):
        cls.app = None
        if sys.platform.startswith('linux') and not os.environ.get('DISPLAY', ''):
            # On linux and no DISPLAY available (e.g., ssh without -X)
            logger.warning('pyFAI.integrate_widget tests disabled (DISPLAY env. variable not set)')
            cls.app = None
        elif qt is not None:
            cls.app = qt.QApplication([])

        config = {"poni": UtilsTest.getimage("Pilatus1M.poni")}
        integration_config.normalize(config, inplace=True)
        cls.base_config = config
Ejemplo n.º 2
0
 def create_json(self, ponipath=None, nbpt_azim=1):
     if ponipath is None:
         ponipath = UtilsTest.getimage("Pilatus1M.poni")
     data = {"poni": ponipath}
     integration_config.normalize(data, inplace=True)
     data["wavelength"] = 1
     data["nbpt_rad"] = 3
     data["nbpt_azim"] = nbpt_azim
     data["do_2D"] = nbpt_azim > 1
     data["method"] = ("bbox", "histogram", "cython")
     path = os.path.join(self.tempDir, "config.json")
     with open(path, 'w') as fp:
         json.dump(data, fp)
     return path
Ejemplo n.º 3
0
 def create_json(self, ponipath=None, nbpt_azim=1):
     if ponipath is None:
         ponipath = UtilsTest.getimage("Pilatus1M.poni")
     data = {"poni": ponipath}
     integration_config.normalize(data, inplace=True)
     data["wavelength"] = 1
     data["nbpt_rad"] = 3
     data["nbpt_azim"] = nbpt_azim
     data["do_2D"] = nbpt_azim > 1
     data["method"] = ("bbox", "histogram", "cython")
     path = os.path.join(self.tempDir, "config.json")
     with open(path, 'w') as fp:
         json.dump(data, fp)
     return path
Ejemplo n.º 4
0
 def setUpClass(cls):
     config = {"poni": UtilsTest.getimage("Pilatus1M.poni")}
     integration_config.normalize(config, inplace=True)
     cls.base_config = config
Ejemplo n.º 5
0
 def setUpClass(cls):
     config = {"poni": UtilsTest.getimage("Pilatus1M.poni")}
     integration_config.normalize(config, inplace=True)
     cls.base_config = config