Commit 544109a2 authored by Pierre Paleo's avatar Pierre Paleo
Browse files

cli.reconstruct: dont proceed if no energy for phase retrieval

parent c491bb0a
Pipeline #27859 passed with stages
in 2 minutes and 11 seconds
......@@ -57,6 +57,10 @@ def main():
logger.warning("Using user-provided energy %.2f keV" % args["energy"])
proc.dataset_infos.dataset_scanner._energy = args["energy"]
proc.processing_options["phase"]["energy_kev"] = args["energy"]
if proc.dataset_infos.energy < 1e-3 and proc.nabu_config["phase"]["method"] != None:
msg = "No information on energy. Cannot retrieve phase. Please use the --energy option"
logger.fatal(msg)
raise ValueError(msg)
#
if __has_pycuda__:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment