bug fix, clen substitution did not take into account the beam energy might be a float. Now, the possibility is taken into account

This commit is contained in:
Beale John Henry
2023-10-05 09:48:39 +02:00
parent 4c264a401f
commit 5e6b5160f1

View File

@@ -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 ) current_geom_file = re.sub( current_clen, new_clen, current_geom_file )
# input new energy # input new energy
current_energy = r"photon_energy = \d+" current_energy = r"photon_energy = \d+\.?\d+?"
new_energy = r"photon_energy = " + str( energy ) new_energy = r"photon_energy = " + str( energy )
current_geom_file = re.sub( current_energy, new_energy, current_geom_file ) current_geom_file = re.sub( current_energy, new_energy, current_geom_file )