diff --git a/pyfai-tools/update-geom-from-lab6.py b/pyfai-tools/update-geom-from-lab6.py index ba1f811..f840dba 100644 --- a/pyfai-tools/update-geom-from-lab6.py +++ b/pyfai-tools/update-geom-from-lab6.py @@ -75,14 +75,14 @@ def scrub_poni( path_to_poni_file ): wave = float(wave[0]) * np.float_power( 10, int( wave[1]) ) # calculate beam_centre - poni1_p = float( poni1_m ) / 0.000000075 - poni2_p = float( poni2_m ) / 0.000000075 + poni1_p = float( poni1_m ) / 0.000075 + poni2_p = float( poni2_m ) / 0.000075 # calculate beam energy in eV eV = ( ( constants.c * constants.h ) / wave ) / constants.electron_volt # return poni1 = y, poni2 = x and energy - return poni1_p, poni2_p, eV, round( float( clen )*1000, 5 ) + return poni1_p, poni2_p, eV, round( float( clen ), 5 ) def write_new_positions( path_to_geom, beam_x, beam_y, clen, energy, jungfrau, p_group ): @@ -194,7 +194,7 @@ if __name__ == "__main__": elif args.poni is not None: print( "reading poni file" ) beam_y, beam_x, eV, clen = scrub_poni( args.poni ) - print( "beam x, beam_y = {0}, {1}\nphoton_energy = {2}\nclen = {3}".format( beam_x, beam_y, eV, clen ) ) + print( "beam x, beam_y = {0}, {1}\nphoton_energy = {2}\nclen = {3} m".format( beam_x, beam_y, eV, clen ) ) new_geom_name = write_new_positions( args.geom, beam_x, beam_y, clen, eV, args.jungfrau, args.p_group ) print( "updated .geom file with poni calculations\n new .geom = {0}".format( new_geom_name ) ) else: