Skip to content
Snippets Groups Projects
Commit b6258e45 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

PyCore/polmagcylinders2.py: print progress messages

parent ec874f37
No related branches found
No related tags found
No related merge requests found
...@@ -14,6 +14,7 @@ REFERENCE_DIR = "@TEST_REFERENCE_DIR@/Core" ...@@ -14,6 +14,7 @@ REFERENCE_DIR = "@TEST_REFERENCE_DIR@/Core"
# describe sample and run simulation # describe sample and run simulation
# ---------------------------------- # ----------------------------------
def getSimulationIntensity(rho_beam, efficiency): def getSimulationIntensity(rho_beam, efficiency):
print("- simulate", flush=True)
# defining materials # defining materials
mAmbience = HomogeneousMaterial("Air", 0.0, 0.0) mAmbience = HomogeneousMaterial("Air", 0.0, 0.0)
mSubstrate = HomogeneousMaterial("Substrate", 15e-6, 0.0) mSubstrate = HomogeneousMaterial("Substrate", 15e-6, 0.0)
...@@ -48,6 +49,7 @@ def getSimulationIntensity(rho_beam, efficiency): ...@@ -48,6 +49,7 @@ def getSimulationIntensity(rho_beam, efficiency):
simulation.setSample(multi_layer) simulation.setSample(multi_layer)
simulation.setBeamIntensity(1e9) simulation.setBeamIntensity(1e9)
simulation.runSimulation() simulation.runSimulation()
print("- - simulation done", flush=True)
return simulation.result() return simulation.result()
...@@ -56,12 +58,17 @@ def get_reference_data(filename): ...@@ -56,12 +58,17 @@ def get_reference_data(filename):
""" """
read and return reference data from file read and return reference data from file
""" """
return IntensityDataIOFactory.readIntensityData(os.path.join(REFERENCE_DIR,filename)) path = os.path.join(REFERENCE_DIR,filename)
print("- read reference from", path, flush=True)
ret = IntensityDataIOFactory.readIntensityData(path)
print("- - reference read", flush=True)
return ret
# -------------------------------------------------------------- # --------------------------------------------------------------
# run test and analyse test results # run test and analyse test results
# -------------------------------------------------------------- # --------------------------------------------------------------
def run_test(): def run_test():
print("run test", flush=True)
zplus = kvector_t(0.0, 0.0, 1.0) zplus = kvector_t(0.0, 0.0, 1.0)
zmin = kvector_t(0.0, 0.0, -1.0) zmin = kvector_t(0.0, 0.0, -1.0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment