From 5e6b5160f1a4c64d9c4146d7810846cc3d244c83 Mon Sep 17 00:00:00 2001 From: Beale John Henry Date: Thu, 5 Oct 2023 09:48:39 +0200 Subject: [PATCH] bug fix, clen substitution did not take into account the beam energy might be a float. Now, the possibility is taken into account --- pyfai-tools/update-geom-from-lab6.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyfai-tools/update-geom-from-lab6.py b/pyfai-tools/update-geom-from-lab6.py index 95b1f15..e555bf7 100644 --- a/pyfai-tools/update-geom-from-lab6.py +++ b/pyfai-tools/update-geom-from-lab6.py @@ -118,7 +118,7 @@ def write_new_positions( path_to_geom, beam_x, beam_y, clen, energy, jungfrau, p current_geom_file = re.sub( current_clen, new_clen, current_geom_file ) # input new energy - current_energy = r"photon_energy = \d+" + current_energy = r"photon_energy = \d+\.?\d+?" new_energy = r"photon_energy = " + str( energy ) current_geom_file = re.sub( current_energy, new_energy, current_geom_file )