Closed tbaudier closed 8 months ago
After this pull request is merged we need to update the documentation -> me and @MartiDvrk can do that.
I updated with master branch. I had some problem with some tests and the function insert_suffix_before_extension, could you check on your side please? Thank you
Some tests still have errors:
test059_tpsource_weights
Importing opengate (thread 2513909) ... done
Simulation: create RunManager (single thread)
Simulation: initialize Geometry
Simulation: initialize Physics
Simulation: initialize Source
No source: no particle will be generated
Simulation: initialize Actors
Simulation: initialize G4RunManager
Simulation: check volumes overlap
--------------------------------------------------------------------------------
Simulation: START
/Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_1.mhd
/Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_1.mhd
edep
/Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_1-edep.mhd
You try to compute statistical errors with only one or zero event ! The uncertainty value for all voxels has been fixed at 1
/Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_1-edep.mhd
uncertainty
/Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_1-edep-uncertainty.mhd
/Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_2.mhd
/Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_2.mhd
edep
/Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_2-edep.mhd
You try to compute statistical errors with only one or zero event ! The uncertainty value for all voxels has been fixed at 1
/Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_2-edep.mhd
uncertainty
/Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_2-edep-uncertainty.mhd
Simulation: STOP. Run: 1. Time: 1.3 seconds.
--------------------------------------------------------------------------------
Runs 1
Events 1
Tracks 1
Step 0
Init 1.312985 1.31299 s
Duration 2.376851 2.37685 s
PPS 0
TPS 0
SPS 0
Start Tue Jan 9 15:56:45 2024
Stop Tue Jan 9 15:56:49 2024
Sim start 0 ps
Sim end 1 s
Threads 1
Arch Darwin
Python 3.9.7
Track types: {'geantino': 1}
Compare tps Edep to single pb sources
---------------------------------------
Images with same size/spacing/origin/dir ? True
Image1: [250 250 1] [0.4 0.4 2. ] [-49.8 -49.8 0. ]
Image2: [250 250 1] [0.4 0.4 2. ] [-49.8 -49.8 0. ]
Img sums 0.0 vs 0.0 : 0.00 % (tol 5.00 %)
Image1: [250 250 1] [0.4 0.4 2. ] [-49.8 -49.8 0. ] /Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_1-edep.mhd
Image2: [250 250 1] [0.4 0.4 2. ] [-49.8 -49.8 0. ] /Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_1-edep.mhd
Image diff computed on 62500/62500
SAD (per event/total): 0.00 % (tolerance is 70.00 %)
Save image test figure : /Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_1-edep_test.png
Images with same size/spacing/origin/dir ? True
Image1: [250 250 1] [0.4 0.4 2. ] [-49.8 -49.8 0. ]
Image2: [250 250 1] [0.4 0.4 2. ] [-49.8 -49.8 0. ]
Img sums 0.0 vs 0.0 : 0.00 % (tol 5.00 %)
Image1: [250 250 1] [0.4 0.4 2. ] [-49.8 -49.8 0. ] /Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_1-edep.mhd
Image2: [250 250 1] [0.4 0.4 2. ] [-49.8 -49.8 0. ] /Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_1-edep.mhd
Image diff computed on 62500/62500
SAD (per event/total): 0.00 % (tolerance is 70.00 %)
Save image test figure : /Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_1-edep_test.png
---------------------------------------
Compare ratio of the two spots with expected ratio
invalid value encountered in divide
Sum energy dep for phantom 1: 0.0
MSum energy dep for phantom 2: 0.0
Ratio is: nan
Expected ratio is: 2
Ratio not as expected
Error during the tests !
test069_rotation_DICOM_RT_plan
...
Area from theoretical calculation for all CP (mm2): [448.625 354.275 485.625 335.775]
Area from MC simulations for all CP: (mm2) [423.25 423.25 423.25 423.25]
-> In test069, the dose actor need to be rotated?
Some tests still have errors:
test059_tpsource_weights
Importing opengate (thread 2513909) ... done Simulation: create RunManager (single thread) Simulation: initialize Geometry Simulation: initialize Physics Simulation: initialize Source No source: no particle will be generated Simulation: initialize Actors Simulation: initialize G4RunManager Simulation: check volumes overlap -------------------------------------------------------------------------------- Simulation: START /Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_1.mhd /Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_1.mhd edep /Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_1-edep.mhd You try to compute statistical errors with only one or zero event ! The uncertainty value for all voxels has been fixed at 1 /Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_1-edep.mhd uncertainty /Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_1-edep-uncertainty.mhd /Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_2.mhd /Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_2.mhd edep /Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_2-edep.mhd You try to compute statistical errors with only one or zero event ! The uncertainty value for all voxels has been fixed at 1 /Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_2-edep.mhd uncertainty /Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_2-edep-uncertainty.mhd Simulation: STOP. Run: 1. Time: 1.3 seconds. -------------------------------------------------------------------------------- Runs 1 Events 1 Tracks 1 Step 0 Init 1.312985 1.31299 s Duration 2.376851 2.37685 s PPS 0 TPS 0 SPS 0 Start Tue Jan 9 15:56:45 2024 Stop Tue Jan 9 15:56:49 2024 Sim start 0 ps Sim end 1 s Threads 1 Arch Darwin Python 3.9.7 Track types: {'geantino': 1} Compare tps Edep to single pb sources --------------------------------------- Images with same size/spacing/origin/dir ? True Image1: [250 250 1] [0.4 0.4 2. ] [-49.8 -49.8 0. ] Image2: [250 250 1] [0.4 0.4 2. ] [-49.8 -49.8 0. ] Img sums 0.0 vs 0.0 : 0.00 % (tol 5.00 %) Image1: [250 250 1] [0.4 0.4 2. ] [-49.8 -49.8 0. ] /Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_1-edep.mhd Image2: [250 250 1] [0.4 0.4 2. ] [-49.8 -49.8 0. ] /Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_1-edep.mhd Image diff computed on 62500/62500 SAD (per event/total): 0.00 % (tolerance is 70.00 %) Save image test figure : /Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_1-edep_test.png Images with same size/spacing/origin/dir ? True Image1: [250 250 1] [0.4 0.4 2. ] [-49.8 -49.8 0. ] Image2: [250 250 1] [0.4 0.4 2. ] [-49.8 -49.8 0. ] Img sums 0.0 vs 0.0 : 0.00 % (tol 5.00 %) Image1: [250 250 1] [0.4 0.4 2. ] [-49.8 -49.8 0. ] /Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_1-edep.mhd Image2: [250 250 1] [0.4 0.4 2. ] [-49.8 -49.8 0. ] /Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_1-edep.mhd Image diff computed on 62500/62500 SAD (per event/total): 0.00 % (tolerance is 70.00 %) Save image test figure : /Users/tbaudier/Software/GatePython/opengate_other/opengate/tests/src/../output/output_test059_rtp/phantom_a_1-edep_test.png --------------------------------------- Compare ratio of the two spots with expected ratio invalid value encountered in divide Sum energy dep for phantom 1: 0.0 MSum energy dep for phantom 2: 0.0 Ratio is: nan Expected ratio is: 2 Ratio not as expected Error during the tests !
test069_rotation_DICOM_RT_plan
... Area from theoretical calculation for all CP (mm2): [448.625 354.275 485.625 335.775] Area from MC simulations for all CP: (mm2) [423.25 423.25 423.25 423.25]
-> In test069, the dose actor need to be rotated?
Test059 works for me. Is it possible that the .txt plan file for this test is not up to date? I can share here the file we use. TreatmentPlan2Spots.txt
@tbaudier I think now the only tests that are failing are the ones with MT on the Windows OS. I think we are getting close to closing this PR :)
tests with multithread must be named with "_mt" (lower case) to be ignored on windows
I changed the tolerance for test059_tpsource_abs_dose : is it ok for you @MartiDvrk @andiresch ?
Still tolerance issue with test059_tpsource_optics : @nkrah @guneet19 I did not change it yet, can you check please ?
@dsarrut I believe this testcase belongs to a different team. We have only worked on test013_phys_lists_6.
Squash of PR https://github.com/OpenGATE/opengate/pull/293
Add a commit to modify the test to deal with master
I did a test on Mac to check time with test009_voxel and x100 for activity: