From 4896d8c85f3a7ddb919fd5a71481bfe7dc093b1f Mon Sep 17 00:00:00 2001 From: edgar Date: Mon, 15 Apr 2024 14:28:20 +0200 Subject: [PATCH] only config copy --- src/pyFAI/diffmap.py | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/src/pyFAI/diffmap.py b/src/pyFAI/diffmap.py index 7177802a..0700727a 100644 --- a/src/pyFAI/diffmap.py +++ b/src/pyFAI/diffmap.py @@ -226,21 +226,11 @@ If the number of files is too large, use double quotes like "*.edf" """ self.inputfiles = [i[0] for i in config.get("input_data", [])] if "ai" in config: ai = config["ai"] + elif config.get("application", None) == "pyfai-integrate": + ai = config.copy() else: ai = {} - ai_keys = [ - "wavelength", - "dist", - "poni1", "poni2", - "rot1", "rot2", "rot3", - "detector", "detector_config", - "nbpt_rad", "nbpt_azim", - ] - for poni_key in ai_keys: - if not poni_key in ai.keys() and config.get(poni_key, None): - ai[poni_key] = config[poni_key] - self.poni = config["ai"] = ai if "output_file" in config: self.hdf5 = config["output_file"] @@ -272,7 +262,7 @@ If the number of files is too large, use double quotes like "*.edf" """ else: raise RuntimeError("No such flat files") - if ocl and (options.gpu or 'opencl' in config.get("method", "")): + if ocl and options.gpu: ai["opencl_device"] = ocl.select_device(type="gpu") ai["method"] = ["full", "csr", "opencl"] @@ -296,15 +286,6 @@ If the number of files is too large, use double quotes like "*.edf" """ ai["do_mask"] = True else: logger.warning("No such mask file %s", mask) - elif config.get("do_mask", None) and config.get("mask_file", None): - mask = urlparse(config["mask_file"]).path - if os.path.isfile(mask): - logger.info("Reading Mask file from: %s", mask) - self.mask = os.path.abspath(mask) - ai["mask_file"] = self.mask - ai["do_mask"] = True - else: - logger.warning("No such mask file %s", mask) if options.poni: if os.path.isfile(options.poni): logger.info("Reading PONI file from: %s", options.poni)