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
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
def setUpClass(cls): config = {"poni": UtilsTest.getimage("Pilatus1M.poni")} integration_config.normalize(config, inplace=True) cls.base_config = config