-
Notifications
You must be signed in to change notification settings - Fork 25
EMC Example
Juncheng E edited this page May 7, 2020
·
1 revision
from SimEx.Calculators.EMCOrientation import EMCOrientation
import sys, os, shutil
run = int(sys.argv[1])
emc_parameters={
'initial_number_of_quaternions' : 5,
'max_number_of_quaternions' : 9,
'max_number_of_iterations' : 100,
'min_error' : 4.0e-8,
'beamstop' : True,
'detailed_output' : True
}
emc = EMCOrientation(parameters=emc_parameters,
input_path='diffr_out.h5'
output_path='emc_out_%07d.h5' % (run),
)
emc.backengine()
# Copy runtime files.
run_files_path = 'emc_run_%07d' % (run)
shutil.copytree(emc.run_files_path, run_files_path )
shutil.copy2(os.path.join(emc.tmp_files_path,'avg_photon.h5'), run_files_path)
shutil.copy2(emc.output_path, run_files_path)