diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_001/comparison_continuous.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_001/comparison_continuous.csv new file mode 100644 index 0000000..b900254 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_001/comparison_continuous.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_Gy,dose_rate_factor,time_s,dose_rate_water_Gy_s,dose_rate_air_Gy_s,k_s,dose_rate_air_Gy_min,k_s_IonTracks,difference,relative_error_%,absolute_error +150,0.672,1.0,0.004184,4.167,3.665,1.0025,219.9,1.0031842406192852,0.0006842406192852923,0.06825342835763515,0.0006842406192852923 +150,0.672,0.5,0.008216,2.122,1.866,1.0013,111.96000000000001,1.0017329029459692,0.0004329029459690936,0.04323409027954595,0.0004329029459690936 +150,0.672,0.2,0.020117,0.867,0.762,1.0005,45.72,1.0008665681172764,0.00036656811727642236,0.03663849248140154,0.00036656811727642236 +226,0.673,1.0,0.00277,6.378,5.61,1.0038,336.6,1.0048431258084969,0.0010431258084968587,0.10391769361395284,0.0010431258084968587 +226,0.673,0.5,0.005401,3.271,2.877,1.0019,172.61999999999998,1.0024726720052124,0.0005726720052123824,0.05715859918279093,0.0005726720052123824 +226,0.673,0.2,0.013849,1.276,1.122,1.0008,67.32000000000001,1.0011052430184895,0.0003052430184895538,0.030499901927413454,0.0003052430184895538 +244,0.676,1.0,0.002562,6.939,6.103,1.0041,366.18,1.0052501443661495,0.0011501443661494637,0.11454480292296222,0.0011501443661494637 +244,0.676,0.5,0.00525,3.386,2.978,1.002,178.68,1.0025627978554872,0.0005627978554871849,0.056167450647423636,0.0005627978554871849 +244,0.676,0.2,0.012956,1.372,1.207,1.0008,72.42,1.0011478459597463,0.00034784595974635124,0.03475679054220136,0.00034784595974635124 +70,0.825,1.0,0.022265,0.936,0.823,1.0006,49.379999999999995,1.0010939815127191,0.0004939815127191771,0.04936853015382542,0.0004939815127191771 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_001/comparison_continuous_clean.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_001/comparison_continuous_clean.csv new file mode 100644 index 0000000..573526d --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_001/comparison_continuous_clean.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_rate_air_Gy_s,k_s,k_s_IonTracks,difference,relative_error_%,absolute_error +150,3.665,1.0025,1.0031842406192852,0.0006842406192852923,0.06825342835763515,0.0006842406192852923 +150,1.866,1.0013,1.0017329029459692,0.0004329029459690936,0.04323409027954595,0.0004329029459690936 +150,0.762,1.0005,1.0008665681172764,0.00036656811727642236,0.03663849248140154,0.00036656811727642236 +226,5.61,1.0038,1.0048431258084969,0.0010431258084968587,0.10391769361395284,0.0010431258084968587 +226,2.877,1.0019,1.0024726720052124,0.0005726720052123824,0.05715859918279093,0.0005726720052123824 +226,1.122,1.0008,1.0011052430184895,0.0003052430184895538,0.030499901927413454,0.0003052430184895538 +244,6.103,1.0041,1.0052501443661495,0.0011501443661494637,0.11454480292296222,0.0011501443661494637 +244,2.978,1.002,1.0025627978554872,0.0005627978554871849,0.056167450647423636,0.0005627978554871849 +244,1.207,1.0008,1.0011478459597463,0.00034784595974635124,0.03475679054220136,0.00034784595974635124 +70,0.823,1.0006,1.0010939815127191,0.0004939815127191771,0.04936853015382542,0.0004939815127191771 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_001/comparison_initial.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_001/comparison_initial.csv new file mode 100644 index 0000000..38b36b4 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_001/comparison_initial.csv @@ -0,0 +1,5 @@ +Energy_MeV,k_s_experimental,k_s_IonTracks,difference,relative_error_% +70,1.0006,1.0003619141760138,-0.00023808582398610056,-0.023794305815120986 +150,1.0005,1.0002065945483714,-0.0002934054516285922,-0.02932588222174835 +226,1.0008,1.0001579920055679,-0.0006420079944320367,-0.06414947985931622 +244,1.0008,1.0001507878033964,-0.0006492121966035214,-0.06486932420099135 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_001/continuous_beam_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_001/continuous_beam_comparison.png new file mode 100644 index 0000000..c9e776b Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_001/continuous_beam_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_001/initial_recombination_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_001/initial_recombination_comparison.png new file mode 100644 index 0000000..cf58903 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_001/initial_recombination_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_001/relative_error.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_001/relative_error.png new file mode 100644 index 0000000..243efe3 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_001/relative_error.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_001/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_001/run_log.txt new file mode 100644 index 0000000..cde7aac --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_001/run_log.txt @@ -0,0 +1,84 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend cython --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_001 +Return code: 0 +Elapsed time: 1197.70 seconds + +====================================================================== +STDOUT: +====================================================================== +====================================================================== +TESTING EXPERIMENTAL DATA DCPT 2019 +====================================================================== + +Loaded 10 experimental measurements +Energies: [np.int64(70), np.int64(150), np.int64(226), np.int64(244)] MeV +Voltage: 200 V +Electrode gap: 0.2 cm + +====================================================================== +METHOD 1: INITIAL RECOMBINATION +====================================================================== +Calculating for 70 MeV... +Calculating for 150 MeV... +Calculating for 226 MeV... +Calculating for 244 MeV... + +Initial Recombination Comparison: + Energy_MeV k_s_experimental k_s_IonTracks difference relative_error_% + 70 1.0006 1.000362 -0.000238 -0.023794 + 150 1.0005 1.000207 -0.000293 -0.029326 + 226 1.0008 1.000158 -0.000642 -0.064149 + 244 1.0008 1.000151 -0.000649 -0.064869 + +====================================================================== +METHOD 2: CONTINUOUS BEAM (General Recombination) +====================================================================== +WARNING: This may take several minutes... +Progress: 1/10 (10.0%) +Progress: 6/10 (60.0%) + +Continuous Beam Comparison: + Energy_MeV dose_rate_air_Gy_s k_s k_s_IonTracks difference relative_error_% + 70 0.823 1.0006 1.001094 0.000494 0.049 + 150 0.762 1.0005 1.000867 0.000367 0.037 + 150 1.866 1.0013 1.001733 0.000433 0.043 + 150 3.665 1.0025 1.003184 0.000684 0.068 + 226 1.122 1.0008 1.001105 0.000305 0.030 + 226 2.877 1.0019 1.002473 0.000573 0.057 + 226 5.610 1.0038 1.004843 0.001043 0.104 + 244 1.207 1.0008 1.001148 0.000348 0.035 + 244 2.978 1.0020 1.002563 0.000563 0.056 + 244 6.103 1.0041 1.005250 0.001150 0.115 + +=== Error Statistics === +Number of successful calculations: 10/10 +Mean absolute error: 0.000596 +Mean relative error: 0.059% +Median relative error: 0.053% +Max relative error: 0.115% +Min relative error: 0.030% +Standard deviation: 0.029% + +====================================================================== +GENERATING PLOTS +====================================================================== +[OK] Saved: initial_recombination_comparison.png +[OK] Saved: continuous_beam_comparison.png +[OK] Saved: relative_error.png + +====================================================================== +SAVING RESULTS +====================================================================== +[OK] Saved: comparison_initial.csv +[OK] Saved: comparison_continuous.csv + NOTE: Calculations used dose_rate_air_Gy_s (not dose_rate_water_Gy_s) +[OK] Saved: comparison_continuous_clean.csv (essential columns only) + +All results saved in: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_001 + +====================================================================== +TESTING COMPLETED +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_002/comparison_continuous.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_002/comparison_continuous.csv new file mode 100644 index 0000000..b184d24 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_002/comparison_continuous.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_Gy,dose_rate_factor,time_s,dose_rate_water_Gy_s,dose_rate_air_Gy_s,k_s,dose_rate_air_Gy_min,k_s_IonTracks,difference,relative_error_%,absolute_error +150,0.672,1.0,0.004184,4.167,3.665,1.0025,219.9,1.003273481324495,0.0007734813244950622,0.07715524433865958,0.0007734813244950622 +150,0.672,0.5,0.008216,2.122,1.866,1.0013,111.96000000000001,1.0017084153349103,0.000408415334910206,0.040788508430061515,0.000408415334910206 +150,0.672,0.2,0.020117,0.867,0.762,1.0005,45.72,1.0008025813138797,0.000302581313879724,0.030243009883030886,0.000302581313879724 +226,0.673,1.0,0.00277,6.378,5.61,1.0038,336.6,1.004827856049795,0.0010278560497949396,0.10239649828600714,0.0010278560497949396 +226,0.673,0.5,0.005401,3.271,2.877,1.0019,172.61999999999998,1.0025507249820989,0.0006507249820988381,0.06494909492951773,0.0006507249820988381 +226,0.673,0.2,0.013849,1.276,1.122,1.0008,67.32000000000001,1.001052953774079,0.00025295377407918984,0.02527515728209331,0.00025295377407918984 +244,0.676,1.0,0.002562,6.939,6.103,1.0041,366.18,1.005315982423762,0.0012159824237620853,0.12110172530246842,0.0012159824237620853 +244,0.676,0.5,0.00525,3.386,2.978,1.002,178.68,1.0026310045971174,0.0006310045971174016,0.06297451069035945,0.0006310045971174016 +244,0.676,0.2,0.012956,1.372,1.207,1.0008,72.42,1.0011174398430913,0.00031743984309140494,0.03171860942160321,0.00031743984309140494 +70,0.825,1.0,0.022265,0.936,0.823,1.0006,49.379999999999995,1.0010417788071833,0.00044177880718332396,0.04415138988440176,0.00044177880718332396 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_002/comparison_continuous_clean.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_002/comparison_continuous_clean.csv new file mode 100644 index 0000000..64d9c6d --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_002/comparison_continuous_clean.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_rate_air_Gy_s,k_s,k_s_IonTracks,difference,relative_error_%,absolute_error +150,3.665,1.0025,1.003273481324495,0.0007734813244950622,0.07715524433865958,0.0007734813244950622 +150,1.866,1.0013,1.0017084153349103,0.000408415334910206,0.040788508430061515,0.000408415334910206 +150,0.762,1.0005,1.0008025813138797,0.000302581313879724,0.030243009883030886,0.000302581313879724 +226,5.61,1.0038,1.004827856049795,0.0010278560497949396,0.10239649828600714,0.0010278560497949396 +226,2.877,1.0019,1.0025507249820989,0.0006507249820988381,0.06494909492951773,0.0006507249820988381 +226,1.122,1.0008,1.001052953774079,0.00025295377407918984,0.02527515728209331,0.00025295377407918984 +244,6.103,1.0041,1.005315982423762,0.0012159824237620853,0.12110172530246842,0.0012159824237620853 +244,2.978,1.002,1.0026310045971174,0.0006310045971174016,0.06297451069035945,0.0006310045971174016 +244,1.207,1.0008,1.0011174398430913,0.00031743984309140494,0.03171860942160321,0.00031743984309140494 +70,0.823,1.0006,1.0010417788071833,0.00044177880718332396,0.04415138988440176,0.00044177880718332396 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_002/comparison_initial.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_002/comparison_initial.csv new file mode 100644 index 0000000..38b36b4 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_002/comparison_initial.csv @@ -0,0 +1,5 @@ +Energy_MeV,k_s_experimental,k_s_IonTracks,difference,relative_error_% +70,1.0006,1.0003619141760138,-0.00023808582398610056,-0.023794305815120986 +150,1.0005,1.0002065945483714,-0.0002934054516285922,-0.02932588222174835 +226,1.0008,1.0001579920055679,-0.0006420079944320367,-0.06414947985931622 +244,1.0008,1.0001507878033964,-0.0006492121966035214,-0.06486932420099135 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_002/continuous_beam_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_002/continuous_beam_comparison.png new file mode 100644 index 0000000..b0480f8 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_002/continuous_beam_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_002/initial_recombination_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_002/initial_recombination_comparison.png new file mode 100644 index 0000000..cf58903 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_002/initial_recombination_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_002/relative_error.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_002/relative_error.png new file mode 100644 index 0000000..f49afa4 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_002/relative_error.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_002/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_002/run_log.txt new file mode 100644 index 0000000..ee980b4 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_002/run_log.txt @@ -0,0 +1,84 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend cython --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_002 +Return code: 0 +Elapsed time: 1156.06 seconds + +====================================================================== +STDOUT: +====================================================================== +====================================================================== +TESTING EXPERIMENTAL DATA DCPT 2019 +====================================================================== + +Loaded 10 experimental measurements +Energies: [np.int64(70), np.int64(150), np.int64(226), np.int64(244)] MeV +Voltage: 200 V +Electrode gap: 0.2 cm + +====================================================================== +METHOD 1: INITIAL RECOMBINATION +====================================================================== +Calculating for 70 MeV... +Calculating for 150 MeV... +Calculating for 226 MeV... +Calculating for 244 MeV... + +Initial Recombination Comparison: + Energy_MeV k_s_experimental k_s_IonTracks difference relative_error_% + 70 1.0006 1.000362 -0.000238 -0.023794 + 150 1.0005 1.000207 -0.000293 -0.029326 + 226 1.0008 1.000158 -0.000642 -0.064149 + 244 1.0008 1.000151 -0.000649 -0.064869 + +====================================================================== +METHOD 2: CONTINUOUS BEAM (General Recombination) +====================================================================== +WARNING: This may take several minutes... +Progress: 1/10 (10.0%) +Progress: 6/10 (60.0%) + +Continuous Beam Comparison: + Energy_MeV dose_rate_air_Gy_s k_s k_s_IonTracks difference relative_error_% + 70 0.823 1.0006 1.001042 0.000442 0.044 + 150 0.762 1.0005 1.000803 0.000303 0.030 + 150 1.866 1.0013 1.001708 0.000408 0.041 + 150 3.665 1.0025 1.003273 0.000773 0.077 + 226 1.122 1.0008 1.001053 0.000253 0.025 + 226 2.877 1.0019 1.002551 0.000651 0.065 + 226 5.610 1.0038 1.004828 0.001028 0.102 + 244 1.207 1.0008 1.001117 0.000317 0.032 + 244 2.978 1.0020 1.002631 0.000631 0.063 + 244 6.103 1.0041 1.005316 0.001216 0.121 + +=== Error Statistics === +Number of successful calculations: 10/10 +Mean absolute error: 0.000602 +Mean relative error: 0.060% +Median relative error: 0.054% +Max relative error: 0.121% +Min relative error: 0.025% +Standard deviation: 0.032% + +====================================================================== +GENERATING PLOTS +====================================================================== +[OK] Saved: initial_recombination_comparison.png +[OK] Saved: continuous_beam_comparison.png +[OK] Saved: relative_error.png + +====================================================================== +SAVING RESULTS +====================================================================== +[OK] Saved: comparison_initial.csv +[OK] Saved: comparison_continuous.csv + NOTE: Calculations used dose_rate_air_Gy_s (not dose_rate_water_Gy_s) +[OK] Saved: comparison_continuous_clean.csv (essential columns only) + +All results saved in: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_002 + +====================================================================== +TESTING COMPLETED +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_003/comparison_continuous.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_003/comparison_continuous.csv new file mode 100644 index 0000000..4eb52cd --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_003/comparison_continuous.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_Gy,dose_rate_factor,time_s,dose_rate_water_Gy_s,dose_rate_air_Gy_s,k_s,dose_rate_air_Gy_min,k_s_IonTracks,difference,relative_error_%,absolute_error +150,0.672,1.0,0.004184,4.167,3.665,1.0025,219.9,1.0032827658174972,0.0007827658174972552,0.07808137830396561,0.0007827658174972552 +150,0.672,0.5,0.008216,2.122,1.866,1.0013,111.96000000000001,1.0018843819991743,0.0005843819991742105,0.05836232888986422,0.0005843819991742105 +150,0.672,0.2,0.020117,0.867,0.762,1.0005,45.72,1.0008396088696578,0.0003396088696578925,0.03394391500828511,0.0003396088696578925 +226,0.673,1.0,0.00277,6.378,5.61,1.0038,336.6,1.004760559994233,0.0009605599942330567,0.09569236842329713,0.0009605599942330567 +226,0.673,0.5,0.005401,3.271,2.877,1.0019,172.61999999999998,1.0025742056272409,0.0006742056272408536,0.06729270658158036,0.0006742056272408536 +226,0.673,0.2,0.013849,1.276,1.122,1.0008,67.32000000000001,1.0011862187303433,0.0003862187303433906,0.03859100023415174,0.0003862187303433906 +244,0.676,1.0,0.002562,6.939,6.103,1.0041,366.18,1.005240305464198,0.001140305464198077,0.11356493020596325,0.001140305464198077 +244,0.676,0.5,0.00525,3.386,2.978,1.002,178.68,1.0026459665754444,0.0006459665754443566,0.0644677221002352,0.0006459665754443566 +244,0.676,0.2,0.012956,1.372,1.207,1.0008,72.42,1.001264015080931,0.0004640150809311905,0.046364416559871155,0.0004640150809311905 +70,0.825,1.0,0.022265,0.936,0.823,1.0006,49.379999999999995,1.0010139939486804,0.0004139939486804689,0.04137457012597131,0.0004139939486804689 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_003/comparison_continuous_clean.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_003/comparison_continuous_clean.csv new file mode 100644 index 0000000..61d0017 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_003/comparison_continuous_clean.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_rate_air_Gy_s,k_s,k_s_IonTracks,difference,relative_error_%,absolute_error +150,3.665,1.0025,1.0032827658174972,0.0007827658174972552,0.07808137830396561,0.0007827658174972552 +150,1.866,1.0013,1.0018843819991743,0.0005843819991742105,0.05836232888986422,0.0005843819991742105 +150,0.762,1.0005,1.0008396088696578,0.0003396088696578925,0.03394391500828511,0.0003396088696578925 +226,5.61,1.0038,1.004760559994233,0.0009605599942330567,0.09569236842329713,0.0009605599942330567 +226,2.877,1.0019,1.0025742056272409,0.0006742056272408536,0.06729270658158036,0.0006742056272408536 +226,1.122,1.0008,1.0011862187303433,0.0003862187303433906,0.03859100023415174,0.0003862187303433906 +244,6.103,1.0041,1.005240305464198,0.001140305464198077,0.11356493020596325,0.001140305464198077 +244,2.978,1.002,1.0026459665754444,0.0006459665754443566,0.0644677221002352,0.0006459665754443566 +244,1.207,1.0008,1.001264015080931,0.0004640150809311905,0.046364416559871155,0.0004640150809311905 +70,0.823,1.0006,1.0010139939486804,0.0004139939486804689,0.04137457012597131,0.0004139939486804689 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_003/comparison_initial.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_003/comparison_initial.csv new file mode 100644 index 0000000..38b36b4 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_003/comparison_initial.csv @@ -0,0 +1,5 @@ +Energy_MeV,k_s_experimental,k_s_IonTracks,difference,relative_error_% +70,1.0006,1.0003619141760138,-0.00023808582398610056,-0.023794305815120986 +150,1.0005,1.0002065945483714,-0.0002934054516285922,-0.02932588222174835 +226,1.0008,1.0001579920055679,-0.0006420079944320367,-0.06414947985931622 +244,1.0008,1.0001507878033964,-0.0006492121966035214,-0.06486932420099135 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_003/continuous_beam_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_003/continuous_beam_comparison.png new file mode 100644 index 0000000..fa4f914 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_003/continuous_beam_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_003/initial_recombination_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_003/initial_recombination_comparison.png new file mode 100644 index 0000000..cf58903 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_003/initial_recombination_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_003/relative_error.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_003/relative_error.png new file mode 100644 index 0000000..3ecfe3c Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_003/relative_error.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_003/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_003/run_log.txt new file mode 100644 index 0000000..7e06eaf --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_003/run_log.txt @@ -0,0 +1,84 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend cython --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_003 +Return code: 0 +Elapsed time: 1178.31 seconds + +====================================================================== +STDOUT: +====================================================================== +====================================================================== +TESTING EXPERIMENTAL DATA DCPT 2019 +====================================================================== + +Loaded 10 experimental measurements +Energies: [np.int64(70), np.int64(150), np.int64(226), np.int64(244)] MeV +Voltage: 200 V +Electrode gap: 0.2 cm + +====================================================================== +METHOD 1: INITIAL RECOMBINATION +====================================================================== +Calculating for 70 MeV... +Calculating for 150 MeV... +Calculating for 226 MeV... +Calculating for 244 MeV... + +Initial Recombination Comparison: + Energy_MeV k_s_experimental k_s_IonTracks difference relative_error_% + 70 1.0006 1.000362 -0.000238 -0.023794 + 150 1.0005 1.000207 -0.000293 -0.029326 + 226 1.0008 1.000158 -0.000642 -0.064149 + 244 1.0008 1.000151 -0.000649 -0.064869 + +====================================================================== +METHOD 2: CONTINUOUS BEAM (General Recombination) +====================================================================== +WARNING: This may take several minutes... +Progress: 1/10 (10.0%) +Progress: 6/10 (60.0%) + +Continuous Beam Comparison: + Energy_MeV dose_rate_air_Gy_s k_s k_s_IonTracks difference relative_error_% + 70 0.823 1.0006 1.001014 0.000414 0.041 + 150 0.762 1.0005 1.000840 0.000340 0.034 + 150 1.866 1.0013 1.001884 0.000584 0.058 + 150 3.665 1.0025 1.003283 0.000783 0.078 + 226 1.122 1.0008 1.001186 0.000386 0.039 + 226 2.877 1.0019 1.002574 0.000674 0.067 + 226 5.610 1.0038 1.004761 0.000961 0.096 + 244 1.207 1.0008 1.001264 0.000464 0.046 + 244 2.978 1.0020 1.002646 0.000646 0.064 + 244 6.103 1.0041 1.005240 0.001140 0.114 + +=== Error Statistics === +Number of successful calculations: 10/10 +Mean absolute error: 0.000639 +Mean relative error: 0.064% +Median relative error: 0.061% +Max relative error: 0.114% +Min relative error: 0.034% +Standard deviation: 0.026% + +====================================================================== +GENERATING PLOTS +====================================================================== +[OK] Saved: initial_recombination_comparison.png +[OK] Saved: continuous_beam_comparison.png +[OK] Saved: relative_error.png + +====================================================================== +SAVING RESULTS +====================================================================== +[OK] Saved: comparison_initial.csv +[OK] Saved: comparison_continuous.csv + NOTE: Calculations used dose_rate_air_Gy_s (not dose_rate_water_Gy_s) +[OK] Saved: comparison_continuous_clean.csv (essential columns only) + +All results saved in: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_003 + +====================================================================== +TESTING COMPLETED +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_004/comparison_continuous.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_004/comparison_continuous.csv new file mode 100644 index 0000000..87520b8 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_004/comparison_continuous.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_Gy,dose_rate_factor,time_s,dose_rate_water_Gy_s,dose_rate_air_Gy_s,k_s,dose_rate_air_Gy_min,k_s_IonTracks,difference,relative_error_%,absolute_error +150,0.672,1.0,0.004184,4.167,3.665,1.0025,219.9,1.003173378131188,0.0006733781311880627,0.06716988839781174,0.0006733781311880627 +150,0.672,0.5,0.008216,2.122,1.866,1.0013,111.96000000000001,1.0017105275456486,0.00041052754564852023,0.04099945527299712,0.00041052754564852023 +150,0.672,0.2,0.020117,0.867,0.762,1.0005,45.72,1.0007997577270578,0.00029975772705781445,0.029960792309626633,0.00029975772705781445 +226,0.673,1.0,0.00277,6.378,5.61,1.0038,336.6,1.0048627779501191,0.0010627779501191092,0.10587546823262695,0.0010627779501191092 +226,0.673,0.5,0.005401,3.271,2.877,1.0019,172.61999999999998,1.0025130925621488,0.0006130925621488093,0.061192989534764874,0.0006130925621488093 +226,0.673,0.2,0.013849,1.276,1.122,1.0008,67.32000000000001,1.0010657493191673,0.000265749319167341,0.026553688965561654,0.000265749319167341 +244,0.676,1.0,0.002562,6.939,6.103,1.0041,366.18,1.0053134574385327,0.001213457438532739,0.12085025779630904,0.001213457438532739 +244,0.676,0.5,0.00525,3.386,2.978,1.002,178.68,1.0026012480214834,0.0006012480214834248,0.06000479256321605,0.0006012480214834248 +244,0.676,0.2,0.012956,1.372,1.207,1.0008,72.42,1.0011217504264265,0.00032175042642657026,0.03214932318410974,0.00032175042642657026 +70,0.825,1.0,0.022265,0.936,0.823,1.0006,49.379999999999995,1.0009295820370234,0.0003295820370234903,0.032938440637966256,0.0003295820370234903 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_004/comparison_continuous_clean.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_004/comparison_continuous_clean.csv new file mode 100644 index 0000000..387c0eb --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_004/comparison_continuous_clean.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_rate_air_Gy_s,k_s,k_s_IonTracks,difference,relative_error_%,absolute_error +150,3.665,1.0025,1.003173378131188,0.0006733781311880627,0.06716988839781174,0.0006733781311880627 +150,1.866,1.0013,1.0017105275456486,0.00041052754564852023,0.04099945527299712,0.00041052754564852023 +150,0.762,1.0005,1.0007997577270578,0.00029975772705781445,0.029960792309626633,0.00029975772705781445 +226,5.61,1.0038,1.0048627779501191,0.0010627779501191092,0.10587546823262695,0.0010627779501191092 +226,2.877,1.0019,1.0025130925621488,0.0006130925621488093,0.061192989534764874,0.0006130925621488093 +226,1.122,1.0008,1.0010657493191673,0.000265749319167341,0.026553688965561654,0.000265749319167341 +244,6.103,1.0041,1.0053134574385327,0.001213457438532739,0.12085025779630904,0.001213457438532739 +244,2.978,1.002,1.0026012480214834,0.0006012480214834248,0.06000479256321605,0.0006012480214834248 +244,1.207,1.0008,1.0011217504264265,0.00032175042642657026,0.03214932318410974,0.00032175042642657026 +70,0.823,1.0006,1.0009295820370234,0.0003295820370234903,0.032938440637966256,0.0003295820370234903 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_004/comparison_initial.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_004/comparison_initial.csv new file mode 100644 index 0000000..38b36b4 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_004/comparison_initial.csv @@ -0,0 +1,5 @@ +Energy_MeV,k_s_experimental,k_s_IonTracks,difference,relative_error_% +70,1.0006,1.0003619141760138,-0.00023808582398610056,-0.023794305815120986 +150,1.0005,1.0002065945483714,-0.0002934054516285922,-0.02932588222174835 +226,1.0008,1.0001579920055679,-0.0006420079944320367,-0.06414947985931622 +244,1.0008,1.0001507878033964,-0.0006492121966035214,-0.06486932420099135 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_004/continuous_beam_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_004/continuous_beam_comparison.png new file mode 100644 index 0000000..a92c589 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_004/continuous_beam_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_004/initial_recombination_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_004/initial_recombination_comparison.png new file mode 100644 index 0000000..cf58903 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_004/initial_recombination_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_004/relative_error.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_004/relative_error.png new file mode 100644 index 0000000..298b914 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_004/relative_error.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_004/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_004/run_log.txt new file mode 100644 index 0000000..e1ed462 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_004/run_log.txt @@ -0,0 +1,84 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend cython --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_004 +Return code: 0 +Elapsed time: 1173.48 seconds + +====================================================================== +STDOUT: +====================================================================== +====================================================================== +TESTING EXPERIMENTAL DATA DCPT 2019 +====================================================================== + +Loaded 10 experimental measurements +Energies: [np.int64(70), np.int64(150), np.int64(226), np.int64(244)] MeV +Voltage: 200 V +Electrode gap: 0.2 cm + +====================================================================== +METHOD 1: INITIAL RECOMBINATION +====================================================================== +Calculating for 70 MeV... +Calculating for 150 MeV... +Calculating for 226 MeV... +Calculating for 244 MeV... + +Initial Recombination Comparison: + Energy_MeV k_s_experimental k_s_IonTracks difference relative_error_% + 70 1.0006 1.000362 -0.000238 -0.023794 + 150 1.0005 1.000207 -0.000293 -0.029326 + 226 1.0008 1.000158 -0.000642 -0.064149 + 244 1.0008 1.000151 -0.000649 -0.064869 + +====================================================================== +METHOD 2: CONTINUOUS BEAM (General Recombination) +====================================================================== +WARNING: This may take several minutes... +Progress: 1/10 (10.0%) +Progress: 6/10 (60.0%) + +Continuous Beam Comparison: + Energy_MeV dose_rate_air_Gy_s k_s k_s_IonTracks difference relative_error_% + 70 0.823 1.0006 1.000930 0.000330 0.033 + 150 0.762 1.0005 1.000800 0.000300 0.030 + 150 1.866 1.0013 1.001711 0.000411 0.041 + 150 3.665 1.0025 1.003173 0.000673 0.067 + 226 1.122 1.0008 1.001066 0.000266 0.027 + 226 2.877 1.0019 1.002513 0.000613 0.061 + 226 5.610 1.0038 1.004863 0.001063 0.106 + 244 1.207 1.0008 1.001122 0.000322 0.032 + 244 2.978 1.0020 1.002601 0.000601 0.060 + 244 6.103 1.0041 1.005313 0.001213 0.121 + +=== Error Statistics === +Number of successful calculations: 10/10 +Mean absolute error: 0.000579 +Mean relative error: 0.058% +Median relative error: 0.051% +Max relative error: 0.121% +Min relative error: 0.027% +Standard deviation: 0.033% + +====================================================================== +GENERATING PLOTS +====================================================================== +[OK] Saved: initial_recombination_comparison.png +[OK] Saved: continuous_beam_comparison.png +[OK] Saved: relative_error.png + +====================================================================== +SAVING RESULTS +====================================================================== +[OK] Saved: comparison_initial.csv +[OK] Saved: comparison_continuous.csv + NOTE: Calculations used dose_rate_air_Gy_s (not dose_rate_water_Gy_s) +[OK] Saved: comparison_continuous_clean.csv (essential columns only) + +All results saved in: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_004 + +====================================================================== +TESTING COMPLETED +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_005/comparison_continuous.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_005/comparison_continuous.csv new file mode 100644 index 0000000..4f2012b --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_005/comparison_continuous.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_Gy,dose_rate_factor,time_s,dose_rate_water_Gy_s,dose_rate_air_Gy_s,k_s,dose_rate_air_Gy_min,k_s_IonTracks,difference,relative_error_%,absolute_error +150,0.672,1.0,0.004184,4.167,3.665,1.0025,219.9,1.0032376934365952,0.0007376934365952437,0.07358538020900186,0.0007376934365952437 +150,0.672,0.5,0.008216,2.122,1.866,1.0013,111.96000000000001,1.0017115418458864,0.0004115418458863207,0.041100753608940443,0.0004115418458863207 +150,0.672,0.2,0.020117,0.867,0.762,1.0005,45.72,1.0008704419959964,0.0003704419959964511,0.03702568675626698,0.0003704419959964511 +226,0.673,1.0,0.00277,6.378,5.61,1.0038,336.6,1.0048347837240865,0.0010347837240864965,0.10308664316462408,0.0010347837240864965 +226,0.673,0.5,0.005401,3.271,2.877,1.0019,172.61999999999998,1.0025575761063783,0.0006575761063782881,0.06563290811241522,0.0006575761063782881 +226,0.673,0.2,0.013849,1.276,1.122,1.0008,67.32000000000001,1.0010595765008132,0.00025957650081331884,0.02593690056088318,0.00025957650081331884 +244,0.676,1.0,0.002562,6.939,6.103,1.0041,366.18,1.0051421379530168,0.0010421379530167751,0.10378826342164875,0.0010421379530167751 +244,0.676,0.5,0.00525,3.386,2.978,1.002,178.68,1.0026315205657415,0.0006315205657414502,0.06302600456501499,0.0006315205657414502 +244,0.676,0.2,0.012956,1.372,1.207,1.0008,72.42,1.0011344315605484,0.0003344315605484649,0.03341642291651328,0.0003344315605484649 +70,0.825,1.0,0.022265,0.936,0.823,1.0006,49.379999999999995,1.0009455734443555,0.0003455734443555958,0.034536622462082334,0.0003455734443555958 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_005/comparison_continuous_clean.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_005/comparison_continuous_clean.csv new file mode 100644 index 0000000..bb4e092 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_005/comparison_continuous_clean.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_rate_air_Gy_s,k_s,k_s_IonTracks,difference,relative_error_%,absolute_error +150,3.665,1.0025,1.0032376934365952,0.0007376934365952437,0.07358538020900186,0.0007376934365952437 +150,1.866,1.0013,1.0017115418458864,0.0004115418458863207,0.041100753608940443,0.0004115418458863207 +150,0.762,1.0005,1.0008704419959964,0.0003704419959964511,0.03702568675626698,0.0003704419959964511 +226,5.61,1.0038,1.0048347837240865,0.0010347837240864965,0.10308664316462408,0.0010347837240864965 +226,2.877,1.0019,1.0025575761063783,0.0006575761063782881,0.06563290811241522,0.0006575761063782881 +226,1.122,1.0008,1.0010595765008132,0.00025957650081331884,0.02593690056088318,0.00025957650081331884 +244,6.103,1.0041,1.0051421379530168,0.0010421379530167751,0.10378826342164875,0.0010421379530167751 +244,2.978,1.002,1.0026315205657415,0.0006315205657414502,0.06302600456501499,0.0006315205657414502 +244,1.207,1.0008,1.0011344315605484,0.0003344315605484649,0.03341642291651328,0.0003344315605484649 +70,0.823,1.0006,1.0009455734443555,0.0003455734443555958,0.034536622462082334,0.0003455734443555958 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_005/comparison_initial.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_005/comparison_initial.csv new file mode 100644 index 0000000..38b36b4 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_005/comparison_initial.csv @@ -0,0 +1,5 @@ +Energy_MeV,k_s_experimental,k_s_IonTracks,difference,relative_error_% +70,1.0006,1.0003619141760138,-0.00023808582398610056,-0.023794305815120986 +150,1.0005,1.0002065945483714,-0.0002934054516285922,-0.02932588222174835 +226,1.0008,1.0001579920055679,-0.0006420079944320367,-0.06414947985931622 +244,1.0008,1.0001507878033964,-0.0006492121966035214,-0.06486932420099135 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_005/continuous_beam_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_005/continuous_beam_comparison.png new file mode 100644 index 0000000..128b443 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_005/continuous_beam_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_005/initial_recombination_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_005/initial_recombination_comparison.png new file mode 100644 index 0000000..cf58903 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_005/initial_recombination_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_005/relative_error.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_005/relative_error.png new file mode 100644 index 0000000..f1fce5f Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_005/relative_error.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_005/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_005/run_log.txt new file mode 100644 index 0000000..44b9e91 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_005/run_log.txt @@ -0,0 +1,84 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend cython --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_005 +Return code: 0 +Elapsed time: 1174.95 seconds + +====================================================================== +STDOUT: +====================================================================== +====================================================================== +TESTING EXPERIMENTAL DATA DCPT 2019 +====================================================================== + +Loaded 10 experimental measurements +Energies: [np.int64(70), np.int64(150), np.int64(226), np.int64(244)] MeV +Voltage: 200 V +Electrode gap: 0.2 cm + +====================================================================== +METHOD 1: INITIAL RECOMBINATION +====================================================================== +Calculating for 70 MeV... +Calculating for 150 MeV... +Calculating for 226 MeV... +Calculating for 244 MeV... + +Initial Recombination Comparison: + Energy_MeV k_s_experimental k_s_IonTracks difference relative_error_% + 70 1.0006 1.000362 -0.000238 -0.023794 + 150 1.0005 1.000207 -0.000293 -0.029326 + 226 1.0008 1.000158 -0.000642 -0.064149 + 244 1.0008 1.000151 -0.000649 -0.064869 + +====================================================================== +METHOD 2: CONTINUOUS BEAM (General Recombination) +====================================================================== +WARNING: This may take several minutes... +Progress: 1/10 (10.0%) +Progress: 6/10 (60.0%) + +Continuous Beam Comparison: + Energy_MeV dose_rate_air_Gy_s k_s k_s_IonTracks difference relative_error_% + 70 0.823 1.0006 1.000946 0.000346 0.035 + 150 0.762 1.0005 1.000870 0.000370 0.037 + 150 1.866 1.0013 1.001712 0.000412 0.041 + 150 3.665 1.0025 1.003238 0.000738 0.074 + 226 1.122 1.0008 1.001060 0.000260 0.026 + 226 2.877 1.0019 1.002558 0.000658 0.066 + 226 5.610 1.0038 1.004835 0.001035 0.103 + 244 1.207 1.0008 1.001134 0.000334 0.033 + 244 2.978 1.0020 1.002632 0.000632 0.063 + 244 6.103 1.0041 1.005142 0.001042 0.104 + +=== Error Statistics === +Number of successful calculations: 10/10 +Mean absolute error: 0.000583 +Mean relative error: 0.058% +Median relative error: 0.052% +Max relative error: 0.104% +Min relative error: 0.026% +Standard deviation: 0.029% + +====================================================================== +GENERATING PLOTS +====================================================================== +[OK] Saved: initial_recombination_comparison.png +[OK] Saved: continuous_beam_comparison.png +[OK] Saved: relative_error.png + +====================================================================== +SAVING RESULTS +====================================================================== +[OK] Saved: comparison_initial.csv +[OK] Saved: comparison_continuous.csv + NOTE: Calculations used dose_rate_air_Gy_s (not dose_rate_water_Gy_s) +[OK] Saved: comparison_continuous_clean.csv (essential columns only) + +All results saved in: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_005 + +====================================================================== +TESTING COMPLETED +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_006/comparison_continuous.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_006/comparison_continuous.csv new file mode 100644 index 0000000..faa0a0e --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_006/comparison_continuous.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_Gy,dose_rate_factor,time_s,dose_rate_water_Gy_s,dose_rate_air_Gy_s,k_s,dose_rate_air_Gy_min,k_s_IonTracks,difference,relative_error_%,absolute_error +150,0.672,1.0,0.004184,4.167,3.665,1.0025,219.9,1.0032455068357848,0.0007455068357848926,0.07436477164936585,0.0007455068357848926 +150,0.672,0.5,0.008216,2.122,1.866,1.0013,111.96000000000001,1.0017593699721632,0.00045936997216311504,0.045877356652663036,0.00045936997216311504 +150,0.672,0.2,0.020117,0.867,0.762,1.0005,45.72,1.0008449966461064,0.00034499664610643244,0.03448242339894377,0.00034499664610643244 +226,0.673,1.0,0.00277,6.378,5.61,1.0038,336.6,1.004828610190652,0.001028610190652035,0.10247162688304792,0.001028610190652035 +226,0.673,0.5,0.005401,3.271,2.877,1.0019,172.61999999999998,1.00257369531986,0.000673695319860057,0.06724177261803144,0.000673695319860057 +226,0.673,0.2,0.013849,1.276,1.122,1.0008,67.32000000000001,1.001140087608145,0.0003400876081451898,0.03398157555407572,0.0003400876081451898 +244,0.676,1.0,0.002562,6.939,6.103,1.0041,366.18,1.0052402662137208,0.0011402662137207642,0.11356102118521703,0.0011402662137207642 +244,0.676,0.5,0.00525,3.386,2.978,1.002,178.68,1.002611877497141,0.000611877497141089,0.06106561847715459,0.000611877497141089 +244,0.676,0.2,0.012956,1.372,1.207,1.0008,72.42,1.0011454848231511,0.00034548482315122087,0.03452086562262399,0.00034548482315122087 +70,0.825,1.0,0.022265,0.936,0.823,1.0006,49.379999999999995,1.0011004309638585,0.0005004309638585447,0.05001308853273483,0.0005004309638585447 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_006/comparison_continuous_clean.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_006/comparison_continuous_clean.csv new file mode 100644 index 0000000..4dffe34 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_006/comparison_continuous_clean.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_rate_air_Gy_s,k_s,k_s_IonTracks,difference,relative_error_%,absolute_error +150,3.665,1.0025,1.0032455068357848,0.0007455068357848926,0.07436477164936585,0.0007455068357848926 +150,1.866,1.0013,1.0017593699721632,0.00045936997216311504,0.045877356652663036,0.00045936997216311504 +150,0.762,1.0005,1.0008449966461064,0.00034499664610643244,0.03448242339894377,0.00034499664610643244 +226,5.61,1.0038,1.004828610190652,0.001028610190652035,0.10247162688304792,0.001028610190652035 +226,2.877,1.0019,1.00257369531986,0.000673695319860057,0.06724177261803144,0.000673695319860057 +226,1.122,1.0008,1.001140087608145,0.0003400876081451898,0.03398157555407572,0.0003400876081451898 +244,6.103,1.0041,1.0052402662137208,0.0011402662137207642,0.11356102118521703,0.0011402662137207642 +244,2.978,1.002,1.002611877497141,0.000611877497141089,0.06106561847715459,0.000611877497141089 +244,1.207,1.0008,1.0011454848231511,0.00034548482315122087,0.03452086562262399,0.00034548482315122087 +70,0.823,1.0006,1.0011004309638585,0.0005004309638585447,0.05001308853273483,0.0005004309638585447 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_006/comparison_initial.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_006/comparison_initial.csv new file mode 100644 index 0000000..38b36b4 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_006/comparison_initial.csv @@ -0,0 +1,5 @@ +Energy_MeV,k_s_experimental,k_s_IonTracks,difference,relative_error_% +70,1.0006,1.0003619141760138,-0.00023808582398610056,-0.023794305815120986 +150,1.0005,1.0002065945483714,-0.0002934054516285922,-0.02932588222174835 +226,1.0008,1.0001579920055679,-0.0006420079944320367,-0.06414947985931622 +244,1.0008,1.0001507878033964,-0.0006492121966035214,-0.06486932420099135 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_006/continuous_beam_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_006/continuous_beam_comparison.png new file mode 100644 index 0000000..7810d9d Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_006/continuous_beam_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_006/initial_recombination_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_006/initial_recombination_comparison.png new file mode 100644 index 0000000..cf58903 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_006/initial_recombination_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_006/relative_error.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_006/relative_error.png new file mode 100644 index 0000000..1fe7945 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_006/relative_error.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_006/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_006/run_log.txt new file mode 100644 index 0000000..25456db --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_006/run_log.txt @@ -0,0 +1,84 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend cython --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_006 +Return code: 0 +Elapsed time: 1142.57 seconds + +====================================================================== +STDOUT: +====================================================================== +====================================================================== +TESTING EXPERIMENTAL DATA DCPT 2019 +====================================================================== + +Loaded 10 experimental measurements +Energies: [np.int64(70), np.int64(150), np.int64(226), np.int64(244)] MeV +Voltage: 200 V +Electrode gap: 0.2 cm + +====================================================================== +METHOD 1: INITIAL RECOMBINATION +====================================================================== +Calculating for 70 MeV... +Calculating for 150 MeV... +Calculating for 226 MeV... +Calculating for 244 MeV... + +Initial Recombination Comparison: + Energy_MeV k_s_experimental k_s_IonTracks difference relative_error_% + 70 1.0006 1.000362 -0.000238 -0.023794 + 150 1.0005 1.000207 -0.000293 -0.029326 + 226 1.0008 1.000158 -0.000642 -0.064149 + 244 1.0008 1.000151 -0.000649 -0.064869 + +====================================================================== +METHOD 2: CONTINUOUS BEAM (General Recombination) +====================================================================== +WARNING: This may take several minutes... +Progress: 1/10 (10.0%) +Progress: 6/10 (60.0%) + +Continuous Beam Comparison: + Energy_MeV dose_rate_air_Gy_s k_s k_s_IonTracks difference relative_error_% + 70 0.823 1.0006 1.001100 0.000500 0.050 + 150 0.762 1.0005 1.000845 0.000345 0.034 + 150 1.866 1.0013 1.001759 0.000459 0.046 + 150 3.665 1.0025 1.003246 0.000746 0.074 + 226 1.122 1.0008 1.001140 0.000340 0.034 + 226 2.877 1.0019 1.002574 0.000674 0.067 + 226 5.610 1.0038 1.004829 0.001029 0.102 + 244 1.207 1.0008 1.001145 0.000345 0.035 + 244 2.978 1.0020 1.002612 0.000612 0.061 + 244 6.103 1.0041 1.005240 0.001140 0.114 + +=== Error Statistics === +Number of successful calculations: 10/10 +Mean absolute error: 0.000619 +Mean relative error: 0.062% +Median relative error: 0.056% +Max relative error: 0.114% +Min relative error: 0.034% +Standard deviation: 0.028% + +====================================================================== +GENERATING PLOTS +====================================================================== +[OK] Saved: initial_recombination_comparison.png +[OK] Saved: continuous_beam_comparison.png +[OK] Saved: relative_error.png + +====================================================================== +SAVING RESULTS +====================================================================== +[OK] Saved: comparison_initial.csv +[OK] Saved: comparison_continuous.csv + NOTE: Calculations used dose_rate_air_Gy_s (not dose_rate_water_Gy_s) +[OK] Saved: comparison_continuous_clean.csv (essential columns only) + +All results saved in: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_006 + +====================================================================== +TESTING COMPLETED +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_007/comparison_continuous.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_007/comparison_continuous.csv new file mode 100644 index 0000000..5ac0070 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_007/comparison_continuous.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_Gy,dose_rate_factor,time_s,dose_rate_water_Gy_s,dose_rate_air_Gy_s,k_s,dose_rate_air_Gy_min,k_s_IonTracks,difference,relative_error_%,absolute_error +150,0.672,1.0,0.004184,4.167,3.665,1.0025,219.9,1.003215150456056,0.0007151504560560795,0.07133670384599297,0.0007151504560560795 +150,0.672,0.5,0.008216,2.122,1.866,1.0013,111.96000000000001,1.0017898227593531,0.0004898227593530535,0.04891868164916144,0.0004898227593530535 +150,0.672,0.2,0.020117,0.867,0.762,1.0005,45.72,1.0008906947744933,0.0003906947744933831,0.03904995247310176,0.0003906947744933831 +226,0.673,1.0,0.00277,6.378,5.61,1.0038,336.6,1.0047766023629623,0.0009766023629622644,0.0972905322735868,0.0009766023629622644 +226,0.673,0.5,0.005401,3.271,2.877,1.0019,172.61999999999998,1.0025182351142354,0.0006182351142354214,0.061706269511470346,0.0006182351142354214 +226,0.673,0.2,0.013849,1.276,1.122,1.0008,67.32000000000001,1.001111679171379,0.00031167917137908674,0.0311430027357201,0.00031167917137908674 +244,0.676,1.0,0.002562,6.939,6.103,1.0041,366.18,1.0052471458433987,0.0011471458433987003,0.11424617502227868,0.0011471458433987003 +244,0.676,0.5,0.00525,3.386,2.978,1.002,178.68,1.0026511767119255,0.0006511767119254941,0.06498769580094751,0.0006511767119254941 +244,0.676,0.2,0.012956,1.372,1.207,1.0008,72.42,1.0012222957303887,0.00042229573038876644,0.04219581638576803,0.00042229573038876644 +70,0.825,1.0,0.022265,0.936,0.823,1.0006,49.379999999999995,1.0010725497771995,0.00047254977719957125,0.047226641734916176,0.00047254977719957125 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_007/comparison_continuous_clean.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_007/comparison_continuous_clean.csv new file mode 100644 index 0000000..47c6ea3 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_007/comparison_continuous_clean.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_rate_air_Gy_s,k_s,k_s_IonTracks,difference,relative_error_%,absolute_error +150,3.665,1.0025,1.003215150456056,0.0007151504560560795,0.07133670384599297,0.0007151504560560795 +150,1.866,1.0013,1.0017898227593531,0.0004898227593530535,0.04891868164916144,0.0004898227593530535 +150,0.762,1.0005,1.0008906947744933,0.0003906947744933831,0.03904995247310176,0.0003906947744933831 +226,5.61,1.0038,1.0047766023629623,0.0009766023629622644,0.0972905322735868,0.0009766023629622644 +226,2.877,1.0019,1.0025182351142354,0.0006182351142354214,0.061706269511470346,0.0006182351142354214 +226,1.122,1.0008,1.001111679171379,0.00031167917137908674,0.0311430027357201,0.00031167917137908674 +244,6.103,1.0041,1.0052471458433987,0.0011471458433987003,0.11424617502227868,0.0011471458433987003 +244,2.978,1.002,1.0026511767119255,0.0006511767119254941,0.06498769580094751,0.0006511767119254941 +244,1.207,1.0008,1.0012222957303887,0.00042229573038876644,0.04219581638576803,0.00042229573038876644 +70,0.823,1.0006,1.0010725497771995,0.00047254977719957125,0.047226641734916176,0.00047254977719957125 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_007/comparison_initial.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_007/comparison_initial.csv new file mode 100644 index 0000000..38b36b4 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_007/comparison_initial.csv @@ -0,0 +1,5 @@ +Energy_MeV,k_s_experimental,k_s_IonTracks,difference,relative_error_% +70,1.0006,1.0003619141760138,-0.00023808582398610056,-0.023794305815120986 +150,1.0005,1.0002065945483714,-0.0002934054516285922,-0.02932588222174835 +226,1.0008,1.0001579920055679,-0.0006420079944320367,-0.06414947985931622 +244,1.0008,1.0001507878033964,-0.0006492121966035214,-0.06486932420099135 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_007/continuous_beam_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_007/continuous_beam_comparison.png new file mode 100644 index 0000000..7d693b6 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_007/continuous_beam_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_007/initial_recombination_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_007/initial_recombination_comparison.png new file mode 100644 index 0000000..cf58903 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_007/initial_recombination_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_007/relative_error.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_007/relative_error.png new file mode 100644 index 0000000..c274d64 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_007/relative_error.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_007/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_007/run_log.txt new file mode 100644 index 0000000..90e859f --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_007/run_log.txt @@ -0,0 +1,84 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend cython --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_007 +Return code: 0 +Elapsed time: 1122.17 seconds + +====================================================================== +STDOUT: +====================================================================== +====================================================================== +TESTING EXPERIMENTAL DATA DCPT 2019 +====================================================================== + +Loaded 10 experimental measurements +Energies: [np.int64(70), np.int64(150), np.int64(226), np.int64(244)] MeV +Voltage: 200 V +Electrode gap: 0.2 cm + +====================================================================== +METHOD 1: INITIAL RECOMBINATION +====================================================================== +Calculating for 70 MeV... +Calculating for 150 MeV... +Calculating for 226 MeV... +Calculating for 244 MeV... + +Initial Recombination Comparison: + Energy_MeV k_s_experimental k_s_IonTracks difference relative_error_% + 70 1.0006 1.000362 -0.000238 -0.023794 + 150 1.0005 1.000207 -0.000293 -0.029326 + 226 1.0008 1.000158 -0.000642 -0.064149 + 244 1.0008 1.000151 -0.000649 -0.064869 + +====================================================================== +METHOD 2: CONTINUOUS BEAM (General Recombination) +====================================================================== +WARNING: This may take several minutes... +Progress: 1/10 (10.0%) +Progress: 6/10 (60.0%) + +Continuous Beam Comparison: + Energy_MeV dose_rate_air_Gy_s k_s k_s_IonTracks difference relative_error_% + 70 0.823 1.0006 1.001073 0.000473 0.047 + 150 0.762 1.0005 1.000891 0.000391 0.039 + 150 1.866 1.0013 1.001790 0.000490 0.049 + 150 3.665 1.0025 1.003215 0.000715 0.071 + 226 1.122 1.0008 1.001112 0.000312 0.031 + 226 2.877 1.0019 1.002518 0.000618 0.062 + 226 5.610 1.0038 1.004777 0.000977 0.097 + 244 1.207 1.0008 1.001222 0.000422 0.042 + 244 2.978 1.0020 1.002651 0.000651 0.065 + 244 6.103 1.0041 1.005247 0.001147 0.114 + +=== Error Statistics === +Number of successful calculations: 10/10 +Mean absolute error: 0.000620 +Mean relative error: 0.062% +Median relative error: 0.055% +Max relative error: 0.114% +Min relative error: 0.031% +Standard deviation: 0.027% + +====================================================================== +GENERATING PLOTS +====================================================================== +[OK] Saved: initial_recombination_comparison.png +[OK] Saved: continuous_beam_comparison.png +[OK] Saved: relative_error.png + +====================================================================== +SAVING RESULTS +====================================================================== +[OK] Saved: comparison_initial.csv +[OK] Saved: comparison_continuous.csv + NOTE: Calculations used dose_rate_air_Gy_s (not dose_rate_water_Gy_s) +[OK] Saved: comparison_continuous_clean.csv (essential columns only) + +All results saved in: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_007 + +====================================================================== +TESTING COMPLETED +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_008/comparison_continuous.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_008/comparison_continuous.csv new file mode 100644 index 0000000..0135efa --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_008/comparison_continuous.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_Gy,dose_rate_factor,time_s,dose_rate_water_Gy_s,dose_rate_air_Gy_s,k_s,dose_rate_air_Gy_min,k_s_IonTracks,difference,relative_error_%,absolute_error +150,0.672,1.0,0.004184,4.167,3.665,1.0025,219.9,1.0031549885664597,0.0006549885664597355,0.06533551785134518,0.0006549885664597355 +150,0.672,0.5,0.008216,2.122,1.866,1.0013,111.96000000000001,1.0016695813143064,0.0003695813143063109,0.03691014823792179,0.0003695813143063109 +150,0.672,0.2,0.020117,0.867,0.762,1.0005,45.72,1.0007891398620619,0.00028913986206191566,0.028899536437972582,0.00028913986206191566 +226,0.673,1.0,0.00277,6.378,5.61,1.0038,336.6,1.0047099166203382,0.0009099166203381248,0.09064720266369046,0.0009099166203381248 +226,0.673,0.5,0.005401,3.271,2.877,1.0019,172.61999999999998,1.0024773335057016,0.0005773335057015494,0.05762386522622511,0.0005773335057015494 +226,0.673,0.2,0.013849,1.276,1.122,1.0008,67.32000000000001,1.0010285665192191,0.00022856651921920879,0.022838381216947323,0.00022856651921920879 +244,0.676,1.0,0.002562,6.939,6.103,1.0041,366.18,1.0051725963597304,0.0010725963597304489,0.10682166713777999,0.0010725963597304489 +244,0.676,0.5,0.00525,3.386,2.978,1.002,178.68,1.0025845836279899,0.0005845836279898542,0.05834167944010521,0.0005845836279898542 +244,0.676,0.2,0.012956,1.372,1.207,1.0008,72.42,1.0011177319817126,0.0003177319817126989,0.03174779993132483,0.0003177319817126989 +70,0.825,1.0,0.022265,0.936,0.823,1.0006,49.379999999999995,1.0009923115894528,0.00039231158945285394,0.039207634364666594,0.00039231158945285394 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_008/comparison_continuous_clean.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_008/comparison_continuous_clean.csv new file mode 100644 index 0000000..d13a534 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_008/comparison_continuous_clean.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_rate_air_Gy_s,k_s,k_s_IonTracks,difference,relative_error_%,absolute_error +150,3.665,1.0025,1.0031549885664597,0.0006549885664597355,0.06533551785134518,0.0006549885664597355 +150,1.866,1.0013,1.0016695813143064,0.0003695813143063109,0.03691014823792179,0.0003695813143063109 +150,0.762,1.0005,1.0007891398620619,0.00028913986206191566,0.028899536437972582,0.00028913986206191566 +226,5.61,1.0038,1.0047099166203382,0.0009099166203381248,0.09064720266369046,0.0009099166203381248 +226,2.877,1.0019,1.0024773335057016,0.0005773335057015494,0.05762386522622511,0.0005773335057015494 +226,1.122,1.0008,1.0010285665192191,0.00022856651921920879,0.022838381216947323,0.00022856651921920879 +244,6.103,1.0041,1.0051725963597304,0.0010725963597304489,0.10682166713777999,0.0010725963597304489 +244,2.978,1.002,1.0025845836279899,0.0005845836279898542,0.05834167944010521,0.0005845836279898542 +244,1.207,1.0008,1.0011177319817126,0.0003177319817126989,0.03174779993132483,0.0003177319817126989 +70,0.823,1.0006,1.0009923115894528,0.00039231158945285394,0.039207634364666594,0.00039231158945285394 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_008/comparison_initial.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_008/comparison_initial.csv new file mode 100644 index 0000000..38b36b4 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_008/comparison_initial.csv @@ -0,0 +1,5 @@ +Energy_MeV,k_s_experimental,k_s_IonTracks,difference,relative_error_% +70,1.0006,1.0003619141760138,-0.00023808582398610056,-0.023794305815120986 +150,1.0005,1.0002065945483714,-0.0002934054516285922,-0.02932588222174835 +226,1.0008,1.0001579920055679,-0.0006420079944320367,-0.06414947985931622 +244,1.0008,1.0001507878033964,-0.0006492121966035214,-0.06486932420099135 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_008/continuous_beam_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_008/continuous_beam_comparison.png new file mode 100644 index 0000000..554021c Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_008/continuous_beam_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_008/initial_recombination_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_008/initial_recombination_comparison.png new file mode 100644 index 0000000..cf58903 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_008/initial_recombination_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_008/relative_error.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_008/relative_error.png new file mode 100644 index 0000000..d2565e0 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_008/relative_error.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_008/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_008/run_log.txt new file mode 100644 index 0000000..e567908 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_008/run_log.txt @@ -0,0 +1,84 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend cython --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_008 +Return code: 0 +Elapsed time: 1208.29 seconds + +====================================================================== +STDOUT: +====================================================================== +====================================================================== +TESTING EXPERIMENTAL DATA DCPT 2019 +====================================================================== + +Loaded 10 experimental measurements +Energies: [np.int64(70), np.int64(150), np.int64(226), np.int64(244)] MeV +Voltage: 200 V +Electrode gap: 0.2 cm + +====================================================================== +METHOD 1: INITIAL RECOMBINATION +====================================================================== +Calculating for 70 MeV... +Calculating for 150 MeV... +Calculating for 226 MeV... +Calculating for 244 MeV... + +Initial Recombination Comparison: + Energy_MeV k_s_experimental k_s_IonTracks difference relative_error_% + 70 1.0006 1.000362 -0.000238 -0.023794 + 150 1.0005 1.000207 -0.000293 -0.029326 + 226 1.0008 1.000158 -0.000642 -0.064149 + 244 1.0008 1.000151 -0.000649 -0.064869 + +====================================================================== +METHOD 2: CONTINUOUS BEAM (General Recombination) +====================================================================== +WARNING: This may take several minutes... +Progress: 1/10 (10.0%) +Progress: 6/10 (60.0%) + +Continuous Beam Comparison: + Energy_MeV dose_rate_air_Gy_s k_s k_s_IonTracks difference relative_error_% + 70 0.823 1.0006 1.000992 0.000392 0.039 + 150 0.762 1.0005 1.000789 0.000289 0.029 + 150 1.866 1.0013 1.001670 0.000370 0.037 + 150 3.665 1.0025 1.003155 0.000655 0.065 + 226 1.122 1.0008 1.001029 0.000229 0.023 + 226 2.877 1.0019 1.002477 0.000577 0.058 + 226 5.610 1.0038 1.004710 0.000910 0.091 + 244 1.207 1.0008 1.001118 0.000318 0.032 + 244 2.978 1.0020 1.002585 0.000585 0.058 + 244 6.103 1.0041 1.005173 0.001073 0.107 + +=== Error Statistics === +Number of successful calculations: 10/10 +Mean absolute error: 0.000540 +Mean relative error: 0.054% +Median relative error: 0.048% +Max relative error: 0.107% +Min relative error: 0.023% +Standard deviation: 0.028% + +====================================================================== +GENERATING PLOTS +====================================================================== +[OK] Saved: initial_recombination_comparison.png +[OK] Saved: continuous_beam_comparison.png +[OK] Saved: relative_error.png + +====================================================================== +SAVING RESULTS +====================================================================== +[OK] Saved: comparison_initial.csv +[OK] Saved: comparison_continuous.csv + NOTE: Calculations used dose_rate_air_Gy_s (not dose_rate_water_Gy_s) +[OK] Saved: comparison_continuous_clean.csv (essential columns only) + +All results saved in: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_008 + +====================================================================== +TESTING COMPLETED +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_009/comparison_continuous.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_009/comparison_continuous.csv new file mode 100644 index 0000000..070d40c --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_009/comparison_continuous.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_Gy,dose_rate_factor,time_s,dose_rate_water_Gy_s,dose_rate_air_Gy_s,k_s,dose_rate_air_Gy_min,k_s_IonTracks,difference,relative_error_%,absolute_error +150,0.672,1.0,0.004184,4.167,3.665,1.0025,219.9,1.0031978619310287,0.0006978619310287204,0.06961216269613171,0.0006978619310287204 +150,0.672,0.5,0.008216,2.122,1.866,1.0013,111.96000000000001,1.0018192136240764,0.0005192136240763645,0.05185395226968586,0.0005192136240763645 +150,0.672,0.2,0.020117,0.867,0.762,1.0005,45.72,1.0009292692898255,0.00042926928982556234,0.04290547624443402,0.00042926928982556234 +226,0.673,1.0,0.00277,6.378,5.61,1.0038,336.6,1.0047668916658754,0.0009668916658753801,0.09632313866062762,0.0009668916658753801 +226,0.673,0.5,0.005401,3.271,2.877,1.0019,172.61999999999998,1.002521372406907,0.0006213724069070725,0.06201940382344271,0.0006213724069070725 +226,0.673,0.2,0.013849,1.276,1.122,1.0008,67.32000000000001,1.0011492791266932,0.0003492791266932471,0.034899992675184566,0.0003492791266932471 +244,0.676,1.0,0.002562,6.939,6.103,1.0041,366.18,1.005085487384141,0.0009854873841410594,0.09814633842655705,0.0009854873841410594 +244,0.676,0.5,0.00525,3.386,2.978,1.002,178.68,1.0025470088378092,0.0005470088378092264,0.05459170038016231,0.0005470088378092264 +244,0.676,0.2,0.012956,1.372,1.207,1.0008,72.42,1.0011930608667683,0.0003930608667683799,0.03927466694328337,0.0003930608667683799 +70,0.825,1.0,0.022265,0.936,0.823,1.0006,49.379999999999995,1.0010677275514421,0.0004677275514421986,0.04674470831922832,0.0004677275514421986 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_009/comparison_continuous_clean.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_009/comparison_continuous_clean.csv new file mode 100644 index 0000000..5e495a8 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_009/comparison_continuous_clean.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_rate_air_Gy_s,k_s,k_s_IonTracks,difference,relative_error_%,absolute_error +150,3.665,1.0025,1.0031978619310287,0.0006978619310287204,0.06961216269613171,0.0006978619310287204 +150,1.866,1.0013,1.0018192136240764,0.0005192136240763645,0.05185395226968586,0.0005192136240763645 +150,0.762,1.0005,1.0009292692898255,0.00042926928982556234,0.04290547624443402,0.00042926928982556234 +226,5.61,1.0038,1.0047668916658754,0.0009668916658753801,0.09632313866062762,0.0009668916658753801 +226,2.877,1.0019,1.002521372406907,0.0006213724069070725,0.06201940382344271,0.0006213724069070725 +226,1.122,1.0008,1.0011492791266932,0.0003492791266932471,0.034899992675184566,0.0003492791266932471 +244,6.103,1.0041,1.005085487384141,0.0009854873841410594,0.09814633842655705,0.0009854873841410594 +244,2.978,1.002,1.0025470088378092,0.0005470088378092264,0.05459170038016231,0.0005470088378092264 +244,1.207,1.0008,1.0011930608667683,0.0003930608667683799,0.03927466694328337,0.0003930608667683799 +70,0.823,1.0006,1.0010677275514421,0.0004677275514421986,0.04674470831922832,0.0004677275514421986 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_009/comparison_initial.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_009/comparison_initial.csv new file mode 100644 index 0000000..38b36b4 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_009/comparison_initial.csv @@ -0,0 +1,5 @@ +Energy_MeV,k_s_experimental,k_s_IonTracks,difference,relative_error_% +70,1.0006,1.0003619141760138,-0.00023808582398610056,-0.023794305815120986 +150,1.0005,1.0002065945483714,-0.0002934054516285922,-0.02932588222174835 +226,1.0008,1.0001579920055679,-0.0006420079944320367,-0.06414947985931622 +244,1.0008,1.0001507878033964,-0.0006492121966035214,-0.06486932420099135 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_009/continuous_beam_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_009/continuous_beam_comparison.png new file mode 100644 index 0000000..aa2f416 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_009/continuous_beam_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_009/initial_recombination_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_009/initial_recombination_comparison.png new file mode 100644 index 0000000..cf58903 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_009/initial_recombination_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_009/relative_error.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_009/relative_error.png new file mode 100644 index 0000000..f37ac6f Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_009/relative_error.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_009/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_009/run_log.txt new file mode 100644 index 0000000..2f7bb94 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_009/run_log.txt @@ -0,0 +1,84 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend cython --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_009 +Return code: 0 +Elapsed time: 1105.93 seconds + +====================================================================== +STDOUT: +====================================================================== +====================================================================== +TESTING EXPERIMENTAL DATA DCPT 2019 +====================================================================== + +Loaded 10 experimental measurements +Energies: [np.int64(70), np.int64(150), np.int64(226), np.int64(244)] MeV +Voltage: 200 V +Electrode gap: 0.2 cm + +====================================================================== +METHOD 1: INITIAL RECOMBINATION +====================================================================== +Calculating for 70 MeV... +Calculating for 150 MeV... +Calculating for 226 MeV... +Calculating for 244 MeV... + +Initial Recombination Comparison: + Energy_MeV k_s_experimental k_s_IonTracks difference relative_error_% + 70 1.0006 1.000362 -0.000238 -0.023794 + 150 1.0005 1.000207 -0.000293 -0.029326 + 226 1.0008 1.000158 -0.000642 -0.064149 + 244 1.0008 1.000151 -0.000649 -0.064869 + +====================================================================== +METHOD 2: CONTINUOUS BEAM (General Recombination) +====================================================================== +WARNING: This may take several minutes... +Progress: 1/10 (10.0%) +Progress: 6/10 (60.0%) + +Continuous Beam Comparison: + Energy_MeV dose_rate_air_Gy_s k_s k_s_IonTracks difference relative_error_% + 70 0.823 1.0006 1.001068 0.000468 0.047 + 150 0.762 1.0005 1.000929 0.000429 0.043 + 150 1.866 1.0013 1.001819 0.000519 0.052 + 150 3.665 1.0025 1.003198 0.000698 0.070 + 226 1.122 1.0008 1.001149 0.000349 0.035 + 226 2.877 1.0019 1.002521 0.000621 0.062 + 226 5.610 1.0038 1.004767 0.000967 0.096 + 244 1.207 1.0008 1.001193 0.000393 0.039 + 244 2.978 1.0020 1.002547 0.000547 0.055 + 244 6.103 1.0041 1.005085 0.000985 0.098 + +=== Error Statistics === +Number of successful calculations: 10/10 +Mean absolute error: 0.000598 +Mean relative error: 0.060% +Median relative error: 0.053% +Max relative error: 0.098% +Min relative error: 0.035% +Standard deviation: 0.022% + +====================================================================== +GENERATING PLOTS +====================================================================== +[OK] Saved: initial_recombination_comparison.png +[OK] Saved: continuous_beam_comparison.png +[OK] Saved: relative_error.png + +====================================================================== +SAVING RESULTS +====================================================================== +[OK] Saved: comparison_initial.csv +[OK] Saved: comparison_continuous.csv + NOTE: Calculations used dose_rate_air_Gy_s (not dose_rate_water_Gy_s) +[OK] Saved: comparison_continuous_clean.csv (essential columns only) + +All results saved in: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_009 + +====================================================================== +TESTING COMPLETED +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_010/comparison_continuous.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_010/comparison_continuous.csv new file mode 100644 index 0000000..1d1f234 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_010/comparison_continuous.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_Gy,dose_rate_factor,time_s,dose_rate_water_Gy_s,dose_rate_air_Gy_s,k_s,dose_rate_air_Gy_min,k_s_IonTracks,difference,relative_error_%,absolute_error +150,0.672,1.0,0.004184,4.167,3.665,1.0025,219.9,1.003290851802064,0.0007908518020640631,0.07888796030564221,0.0007908518020640631 +150,0.672,0.5,0.008216,2.122,1.866,1.0013,111.96000000000001,1.001813470247838,0.0005134702478379882,0.051280360315388816,0.0005134702478379882 +150,0.672,0.2,0.020117,0.867,0.762,1.0005,45.72,1.0008063361916788,0.0003063361916788576,0.030618310012879325,0.0003063361916788576 +226,0.673,1.0,0.00277,6.378,5.61,1.0038,336.6,1.0048384614731092,0.0010384614731091535,0.1034530258128266,0.0010384614731091535 +226,0.673,0.5,0.005401,3.271,2.877,1.0019,172.61999999999998,1.0025687978719204,0.0006687978719204235,0.0667529565745507,0.0006687978719204235 +226,0.673,0.2,0.013849,1.276,1.122,1.0008,67.32000000000001,1.001168711525658,0.0003687115256580942,0.03684167922243148,0.0003687115256580942 +244,0.676,1.0,0.002562,6.939,6.103,1.0041,366.18,1.0053035908267385,0.0012035908267384876,0.11986762540966912,0.0012035908267384876 +244,0.676,0.5,0.00525,3.386,2.978,1.002,178.68,1.0026473487154746,0.0006473487154745605,0.06460566022700205,0.0006473487154745605 +244,0.676,0.2,0.012956,1.372,1.207,1.0008,72.42,1.0012331133240833,0.00043311332408335623,0.04327671103950402,0.00043311332408335623 +70,0.825,1.0,0.022265,0.936,0.823,1.0006,49.379999999999995,1.000996420527584,0.00039642052758415147,0.03961828178934154,0.00039642052758415147 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_010/comparison_continuous_clean.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_010/comparison_continuous_clean.csv new file mode 100644 index 0000000..971323b --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_010/comparison_continuous_clean.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_rate_air_Gy_s,k_s,k_s_IonTracks,difference,relative_error_%,absolute_error +150,3.665,1.0025,1.003290851802064,0.0007908518020640631,0.07888796030564221,0.0007908518020640631 +150,1.866,1.0013,1.001813470247838,0.0005134702478379882,0.051280360315388816,0.0005134702478379882 +150,0.762,1.0005,1.0008063361916788,0.0003063361916788576,0.030618310012879325,0.0003063361916788576 +226,5.61,1.0038,1.0048384614731092,0.0010384614731091535,0.1034530258128266,0.0010384614731091535 +226,2.877,1.0019,1.0025687978719204,0.0006687978719204235,0.0667529565745507,0.0006687978719204235 +226,1.122,1.0008,1.001168711525658,0.0003687115256580942,0.03684167922243148,0.0003687115256580942 +244,6.103,1.0041,1.0053035908267385,0.0012035908267384876,0.11986762540966912,0.0012035908267384876 +244,2.978,1.002,1.0026473487154746,0.0006473487154745605,0.06460566022700205,0.0006473487154745605 +244,1.207,1.0008,1.0012331133240833,0.00043311332408335623,0.04327671103950402,0.00043311332408335623 +70,0.823,1.0006,1.000996420527584,0.00039642052758415147,0.03961828178934154,0.00039642052758415147 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_010/comparison_initial.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_010/comparison_initial.csv new file mode 100644 index 0000000..38b36b4 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_010/comparison_initial.csv @@ -0,0 +1,5 @@ +Energy_MeV,k_s_experimental,k_s_IonTracks,difference,relative_error_% +70,1.0006,1.0003619141760138,-0.00023808582398610056,-0.023794305815120986 +150,1.0005,1.0002065945483714,-0.0002934054516285922,-0.02932588222174835 +226,1.0008,1.0001579920055679,-0.0006420079944320367,-0.06414947985931622 +244,1.0008,1.0001507878033964,-0.0006492121966035214,-0.06486932420099135 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_010/continuous_beam_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_010/continuous_beam_comparison.png new file mode 100644 index 0000000..d187d6d Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_010/continuous_beam_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_010/initial_recombination_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_010/initial_recombination_comparison.png new file mode 100644 index 0000000..cf58903 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_010/initial_recombination_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_010/relative_error.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_010/relative_error.png new file mode 100644 index 0000000..8036697 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_010/relative_error.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_010/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_010/run_log.txt new file mode 100644 index 0000000..fce2d66 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/cython/run_010/run_log.txt @@ -0,0 +1,84 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend cython --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_010 +Return code: 0 +Elapsed time: 1093.96 seconds + +====================================================================== +STDOUT: +====================================================================== +====================================================================== +TESTING EXPERIMENTAL DATA DCPT 2019 +====================================================================== + +Loaded 10 experimental measurements +Energies: [np.int64(70), np.int64(150), np.int64(226), np.int64(244)] MeV +Voltage: 200 V +Electrode gap: 0.2 cm + +====================================================================== +METHOD 1: INITIAL RECOMBINATION +====================================================================== +Calculating for 70 MeV... +Calculating for 150 MeV... +Calculating for 226 MeV... +Calculating for 244 MeV... + +Initial Recombination Comparison: + Energy_MeV k_s_experimental k_s_IonTracks difference relative_error_% + 70 1.0006 1.000362 -0.000238 -0.023794 + 150 1.0005 1.000207 -0.000293 -0.029326 + 226 1.0008 1.000158 -0.000642 -0.064149 + 244 1.0008 1.000151 -0.000649 -0.064869 + +====================================================================== +METHOD 2: CONTINUOUS BEAM (General Recombination) +====================================================================== +WARNING: This may take several minutes... +Progress: 1/10 (10.0%) +Progress: 6/10 (60.0%) + +Continuous Beam Comparison: + Energy_MeV dose_rate_air_Gy_s k_s k_s_IonTracks difference relative_error_% + 70 0.823 1.0006 1.000996 0.000396 0.040 + 150 0.762 1.0005 1.000806 0.000306 0.031 + 150 1.866 1.0013 1.001813 0.000513 0.051 + 150 3.665 1.0025 1.003291 0.000791 0.079 + 226 1.122 1.0008 1.001169 0.000369 0.037 + 226 2.877 1.0019 1.002569 0.000669 0.067 + 226 5.610 1.0038 1.004838 0.001038 0.103 + 244 1.207 1.0008 1.001233 0.000433 0.043 + 244 2.978 1.0020 1.002647 0.000647 0.065 + 244 6.103 1.0041 1.005304 0.001204 0.120 + +=== Error Statistics === +Number of successful calculations: 10/10 +Mean absolute error: 0.000637 +Mean relative error: 0.064% +Median relative error: 0.058% +Max relative error: 0.120% +Min relative error: 0.031% +Standard deviation: 0.030% + +====================================================================== +GENERATING PLOTS +====================================================================== +[OK] Saved: initial_recombination_comparison.png +[OK] Saved: continuous_beam_comparison.png +[OK] Saved: relative_error.png + +====================================================================== +SAVING RESULTS +====================================================================== +[OK] Saved: comparison_initial.csv +[OK] Saved: comparison_continuous.csv + NOTE: Calculations used dose_rate_air_Gy_s (not dose_rate_water_Gy_s) +[OK] Saved: comparison_continuous_clean.csv (essential columns only) + +All results saved in: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_010 + +====================================================================== +TESTING COMPLETED +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/metadata_20251210_003508.json b/backend-performance-benchmark/2019_DCPT/benchmark_results/metadata_20251210_003508.json new file mode 100644 index 0000000..71793be --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/metadata_20251210_003508.json @@ -0,0 +1,12 @@ +{ + "timestamp": "20251210_003508", + "start_time": "2025-12-10 00:35:08", + "backends": [ + "python", + "cython", + "numba" + ], + "runs_per_backend": 10, + "total_runs": 30, + "base_output_dir": "C:\\Users\\Jakub Kalinski\\Documents\\GitHub\\IonTracks-Cython\\experimental-data\\2019_DCPT\\benchmark_results" +} \ No newline at end of file diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_001/comparison_continuous.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_001/comparison_continuous.csv new file mode 100644 index 0000000..4a719dc --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_001/comparison_continuous.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_Gy,dose_rate_factor,time_s,dose_rate_water_Gy_s,dose_rate_air_Gy_s,k_s,dose_rate_air_Gy_min,k_s_IonTracks,difference,relative_error_%,absolute_error +150,0.672,1.0,0.004184,4.167,3.665,1.0025,219.9,1.0037521655613255,0.0012521655613255689,0.12490429539407172,0.0012521655613255689 +150,0.672,0.5,0.008216,2.122,1.866,1.0013,111.96000000000001,1.0020349423936565,0.000734942393656457,0.07339882089847767,0.000734942393656457 +150,0.672,0.2,0.020117,0.867,0.762,1.0005,45.72,1.000880338373736,0.0003803383737359667,0.03801482995861736,0.0003803383737359667 +226,0.673,1.0,0.00277,6.378,5.61,1.0038,336.6,1.005518532389687,0.0017185323896868887,0.17120266882714572,0.0017185323896868887 +226,0.673,0.5,0.005401,3.271,2.877,1.0019,172.61999999999998,1.0029233923668643,0.0010233923668643286,0.10214516088075941,0.0010233923668643286 +226,0.673,0.2,0.013849,1.276,1.122,1.0008,67.32000000000001,1.0012458415457204,0.0004458415457204712,0.04454851575943957,0.0004458415457204712 +244,0.676,1.0,0.002562,6.939,6.103,1.0041,366.18,1.0059448860075442,0.0018448860075441775,0.18373528608148368,0.0018448860075441775 +244,0.676,0.5,0.00525,3.386,2.978,1.002,178.68,1.002985889428487,0.0009858894284870967,0.09839215853164637,0.0009858894284870967 +244,0.676,0.2,0.012956,1.372,1.207,1.0008,72.42,1.0013416042170176,0.0005416042170176549,0.05411712799936601,0.0005416042170176549 +70,0.825,1.0,0.022265,0.936,0.823,1.0006,49.379999999999995,1.0012431550974807,0.0006431550974808076,0.0642769435819316,0.0006431550974808076 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_001/comparison_continuous_clean.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_001/comparison_continuous_clean.csv new file mode 100644 index 0000000..cf17e30 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_001/comparison_continuous_clean.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_rate_air_Gy_s,k_s,k_s_IonTracks,difference,relative_error_%,absolute_error +150,3.665,1.0025,1.0037521655613255,0.0012521655613255689,0.12490429539407172,0.0012521655613255689 +150,1.866,1.0013,1.0020349423936565,0.000734942393656457,0.07339882089847767,0.000734942393656457 +150,0.762,1.0005,1.000880338373736,0.0003803383737359667,0.03801482995861736,0.0003803383737359667 +226,5.61,1.0038,1.005518532389687,0.0017185323896868887,0.17120266882714572,0.0017185323896868887 +226,2.877,1.0019,1.0029233923668643,0.0010233923668643286,0.10214516088075941,0.0010233923668643286 +226,1.122,1.0008,1.0012458415457204,0.0004458415457204712,0.04454851575943957,0.0004458415457204712 +244,6.103,1.0041,1.0059448860075442,0.0018448860075441775,0.18373528608148368,0.0018448860075441775 +244,2.978,1.002,1.002985889428487,0.0009858894284870967,0.09839215853164637,0.0009858894284870967 +244,1.207,1.0008,1.0013416042170176,0.0005416042170176549,0.05411712799936601,0.0005416042170176549 +70,0.823,1.0006,1.0012431550974807,0.0006431550974808076,0.0642769435819316,0.0006431550974808076 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_001/comparison_initial.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_001/comparison_initial.csv new file mode 100644 index 0000000..38b36b4 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_001/comparison_initial.csv @@ -0,0 +1,5 @@ +Energy_MeV,k_s_experimental,k_s_IonTracks,difference,relative_error_% +70,1.0006,1.0003619141760138,-0.00023808582398610056,-0.023794305815120986 +150,1.0005,1.0002065945483714,-0.0002934054516285922,-0.02932588222174835 +226,1.0008,1.0001579920055679,-0.0006420079944320367,-0.06414947985931622 +244,1.0008,1.0001507878033964,-0.0006492121966035214,-0.06486932420099135 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_001/continuous_beam_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_001/continuous_beam_comparison.png new file mode 100644 index 0000000..e452401 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_001/continuous_beam_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_001/initial_recombination_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_001/initial_recombination_comparison.png new file mode 100644 index 0000000..cf58903 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_001/initial_recombination_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_001/relative_error.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_001/relative_error.png new file mode 100644 index 0000000..a3fe34b Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_001/relative_error.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_001/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_001/run_log.txt new file mode 100644 index 0000000..db7b30e --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_001/run_log.txt @@ -0,0 +1,134 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend numba --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_001 +Return code: 0 +Elapsed time: 399.75 seconds + +====================================================================== +STDOUT: +====================================================================== +====================================================================== +TESTING EXPERIMENTAL DATA DCPT 2019 +====================================================================== + +Loaded 10 experimental measurements +Energies: [np.int64(70), np.int64(150), np.int64(226), np.int64(244)] MeV +Voltage: 200 V +Electrode gap: 0.2 cm + +====================================================================== +METHOD 1: INITIAL RECOMBINATION +====================================================================== +Calculating for 70 MeV... +Calculating for 150 MeV... +Calculating for 226 MeV... +Calculating for 244 MeV... + +Initial Recombination Comparison: + Energy_MeV k_s_experimental k_s_IonTracks difference relative_error_% + 70 1.0006 1.000362 -0.000238 -0.023794 + 150 1.0005 1.000207 -0.000293 -0.029326 + 226 1.0008 1.000158 -0.000642 -0.064149 + 244 1.0008 1.000151 -0.000649 -0.064869 + +====================================================================== +METHOD 2: CONTINUOUS BEAM (General Recombination) +====================================================================== +WARNING: This may take several minutes... +Progress: 1/10 (10.0%) +Execution for Von Neuman expression: 0.001009225845336914s +Number of steps: 912 +Avg time for inserting track step: 0.0283437684962624s +Avg time for calculating new densities 0.01521563190117217s +Time of simulation: 40.04641509056091s +Execution for Von Neuman expression: 0.0012862682342529297s +Number of steps: 912 +Avg time for inserting track step: 0.013808683083768477s +Avg time for calculating new densities 0.015060736944800928s +Time of simulation: 26.606160402297974s +Execution for Von Neuman expression: 0.0012750625610351562s +Number of steps: 912 +Avg time for inserting track step: 0.005765965633225022s +Avg time for calculating new densities 0.015361901176603217s +Time of simulation: 19.552098989486694s +Execution for Von Neuman expression: 0.0014324188232421875s +Number of steps: 912 +Avg time for inserting track step: 0.0549643162572593s +Avg time for calculating new densities 0.014810475079636825s +Time of simulation: 63.923309564590454s +Execution for Von Neuman expression: 0.0012531280517578125s +Number of steps: 912 +Avg time for inserting track step: 0.028405523875303436s +Avg time for calculating new densities 0.015369373716806111s +Time of simulation: 40.208505630493164s +Progress: 6/10 (60.0%) +Execution for Von Neuman expression: 0.0013401508331298828s +Number of steps: 912 +Avg time for inserting track step: 0.011078104638216789s +Avg time for calculating new densities 0.018530541606116713s +Time of simulation: 27.31931734085083s +Execution for Von Neuman expression: 0.001341104507446289s +Number of steps: 912 +Avg time for inserting track step: 0.06300003303770434s +Avg time for calculating new densities 0.014813489296980072s +Time of simulation: 71.25888657569885s +Execution for Von Neuman expression: 0.0010614395141601562s +Number of steps: 912 +Avg time for inserting track step: 0.03067199206143095s +Avg time for calculating new densities 0.015854895637746443s +Time of simulation: 42.775447845458984s +Execution for Von Neuman expression: 0.0009045600891113281s +Number of steps: 912 +Avg time for inserting track step: 0.012510709333838079s +Avg time for calculating new densities 0.015320386802941038s +Time of simulation: 25.7124240398407s +Execution for Von Neuman expression: 0.0013477802276611328s +Number of steps: 912 +Avg time for inserting track step: 0.003443479799387748s +Avg time for calculating new densities 0.015489369630813599s +Time of simulation: 17.56559419631958s + +Continuous Beam Comparison: + Energy_MeV dose_rate_air_Gy_s k_s k_s_IonTracks difference relative_error_% + 70 0.823 1.0006 1.001243 0.000643 0.064 + 150 0.762 1.0005 1.000880 0.000380 0.038 + 150 1.866 1.0013 1.002035 0.000735 0.073 + 150 3.665 1.0025 1.003752 0.001252 0.125 + 226 1.122 1.0008 1.001246 0.000446 0.045 + 226 2.877 1.0019 1.002923 0.001023 0.102 + 226 5.610 1.0038 1.005519 0.001719 0.171 + 244 1.207 1.0008 1.001342 0.000542 0.054 + 244 2.978 1.0020 1.002986 0.000986 0.098 + 244 6.103 1.0041 1.005945 0.001845 0.184 + +=== Error Statistics === +Number of successful calculations: 10/10 +Mean absolute error: 0.000957 +Mean relative error: 0.095% +Median relative error: 0.086% +Max relative error: 0.184% +Min relative error: 0.038% +Standard deviation: 0.051% + +====================================================================== +GENERATING PLOTS +====================================================================== +[OK] Saved: initial_recombination_comparison.png +[OK] Saved: continuous_beam_comparison.png +[OK] Saved: relative_error.png + +====================================================================== +SAVING RESULTS +====================================================================== +[OK] Saved: comparison_initial.csv +[OK] Saved: comparison_continuous.csv + NOTE: Calculations used dose_rate_air_Gy_s (not dose_rate_water_Gy_s) +[OK] Saved: comparison_continuous_clean.csv (essential columns only) + +All results saved in: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_001 + +====================================================================== +TESTING COMPLETED +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_002/comparison_continuous.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_002/comparison_continuous.csv new file mode 100644 index 0000000..1abf256 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_002/comparison_continuous.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_Gy,dose_rate_factor,time_s,dose_rate_water_Gy_s,dose_rate_air_Gy_s,k_s,dose_rate_air_Gy_min,k_s_IonTracks,difference,relative_error_%,absolute_error +150,0.672,1.0,0.004184,4.167,3.665,1.0025,219.9,1.0037699763135286,0.0012699763135286535,0.12668092903028963,0.0012699763135286535 +150,0.672,0.5,0.008216,2.122,1.866,1.0013,111.96000000000001,1.0021334034992624,0.0008334034992623085,0.08323214813365709,0.0008334034992623085 +150,0.672,0.2,0.020117,0.867,0.762,1.0005,45.72,1.0010152165174164,0.0005152165174164836,0.05149590378975348,0.0005152165174164836 +226,0.673,1.0,0.00277,6.378,5.61,1.0038,336.6,1.0056507002102348,0.0018507002102348125,0.18436941723797692,0.0018507002102348125 +226,0.673,0.5,0.005401,3.271,2.877,1.0019,172.61999999999998,1.0029777321772664,0.0010777321772663662,0.10756883693645734,0.0010777321772663662 +226,0.673,0.2,0.013849,1.276,1.122,1.0008,67.32000000000001,1.0013244166903688,0.0005244166903688452,0.052399749237494526,0.0005244166903688452 +244,0.676,1.0,0.002562,6.939,6.103,1.0041,366.18,1.0060697089364958,0.0019697089364958398,0.19616661054634396,0.0019697089364958398 +244,0.676,0.5,0.00525,3.386,2.978,1.002,178.68,1.0031152392079772,0.0011152392079771811,0.11130131816139532,0.0011152392079771811 +244,0.676,0.2,0.012956,1.372,1.207,1.0008,72.42,1.001386877334434,0.0005868773344341882,0.058640820786789394,0.0005868773344341882 +70,0.825,1.0,0.022265,0.936,0.823,1.0006,49.379999999999995,1.0013924650042627,0.0007924650042627768,0.07919898103765509,0.0007924650042627768 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_002/comparison_continuous_clean.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_002/comparison_continuous_clean.csv new file mode 100644 index 0000000..0da602c --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_002/comparison_continuous_clean.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_rate_air_Gy_s,k_s,k_s_IonTracks,difference,relative_error_%,absolute_error +150,3.665,1.0025,1.0037699763135286,0.0012699763135286535,0.12668092903028963,0.0012699763135286535 +150,1.866,1.0013,1.0021334034992624,0.0008334034992623085,0.08323214813365709,0.0008334034992623085 +150,0.762,1.0005,1.0010152165174164,0.0005152165174164836,0.05149590378975348,0.0005152165174164836 +226,5.61,1.0038,1.0056507002102348,0.0018507002102348125,0.18436941723797692,0.0018507002102348125 +226,2.877,1.0019,1.0029777321772664,0.0010777321772663662,0.10756883693645734,0.0010777321772663662 +226,1.122,1.0008,1.0013244166903688,0.0005244166903688452,0.052399749237494526,0.0005244166903688452 +244,6.103,1.0041,1.0060697089364958,0.0019697089364958398,0.19616661054634396,0.0019697089364958398 +244,2.978,1.002,1.0031152392079772,0.0011152392079771811,0.11130131816139532,0.0011152392079771811 +244,1.207,1.0008,1.001386877334434,0.0005868773344341882,0.058640820786789394,0.0005868773344341882 +70,0.823,1.0006,1.0013924650042627,0.0007924650042627768,0.07919898103765509,0.0007924650042627768 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_002/comparison_initial.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_002/comparison_initial.csv new file mode 100644 index 0000000..38b36b4 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_002/comparison_initial.csv @@ -0,0 +1,5 @@ +Energy_MeV,k_s_experimental,k_s_IonTracks,difference,relative_error_% +70,1.0006,1.0003619141760138,-0.00023808582398610056,-0.023794305815120986 +150,1.0005,1.0002065945483714,-0.0002934054516285922,-0.02932588222174835 +226,1.0008,1.0001579920055679,-0.0006420079944320367,-0.06414947985931622 +244,1.0008,1.0001507878033964,-0.0006492121966035214,-0.06486932420099135 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_002/continuous_beam_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_002/continuous_beam_comparison.png new file mode 100644 index 0000000..dcc7f30 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_002/continuous_beam_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_002/initial_recombination_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_002/initial_recombination_comparison.png new file mode 100644 index 0000000..cf58903 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_002/initial_recombination_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_002/relative_error.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_002/relative_error.png new file mode 100644 index 0000000..0c9f405 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_002/relative_error.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_002/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_002/run_log.txt new file mode 100644 index 0000000..34db6a8 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_002/run_log.txt @@ -0,0 +1,134 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend numba --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_002 +Return code: 0 +Elapsed time: 396.28 seconds + +====================================================================== +STDOUT: +====================================================================== +====================================================================== +TESTING EXPERIMENTAL DATA DCPT 2019 +====================================================================== + +Loaded 10 experimental measurements +Energies: [np.int64(70), np.int64(150), np.int64(226), np.int64(244)] MeV +Voltage: 200 V +Electrode gap: 0.2 cm + +====================================================================== +METHOD 1: INITIAL RECOMBINATION +====================================================================== +Calculating for 70 MeV... +Calculating for 150 MeV... +Calculating for 226 MeV... +Calculating for 244 MeV... + +Initial Recombination Comparison: + Energy_MeV k_s_experimental k_s_IonTracks difference relative_error_% + 70 1.0006 1.000362 -0.000238 -0.023794 + 150 1.0005 1.000207 -0.000293 -0.029326 + 226 1.0008 1.000158 -0.000642 -0.064149 + 244 1.0008 1.000151 -0.000649 -0.064869 + +====================================================================== +METHOD 2: CONTINUOUS BEAM (General Recombination) +====================================================================== +WARNING: This may take several minutes... +Progress: 1/10 (10.0%) +Execution for Von Neuman expression: 0.0011889934539794922s +Number of steps: 912 +Avg time for inserting track step: 0.027843665396958067s +Avg time for calculating new densities 0.015597854005663018s +Time of simulation: 39.898258209228516s +Execution for Von Neuman expression: 0.0013206005096435547s +Number of steps: 912 +Avg time for inserting track step: 0.013923492347984984s +Avg time for calculating new densities 0.01513954029794325s +Time of simulation: 26.80463981628418s +Execution for Von Neuman expression: 0.0009577274322509766s +Number of steps: 912 +Avg time for inserting track step: 0.005634632549787823s +Avg time for calculating new densities 0.01515051617956998s +Time of simulation: 19.245129585266113s +Execution for Von Neuman expression: 0.0012392997741699219s +Number of steps: 912 +Avg time for inserting track step: 0.05438503387727236s +Avg time for calculating new densities 0.016052797959561934s +Time of simulation: 64.54095077514648s +Execution for Von Neuman expression: 0.0008995532989501953s +Number of steps: 912 +Avg time for inserting track step: 0.02807155303787767s +Avg time for calculating new densities 0.01857765960065942s +Time of simulation: 42.82468795776367s +Progress: 6/10 (60.0%) +Execution for Von Neuman expression: 0.0012886524200439453s +Number of steps: 912 +Avg time for inserting track step: 0.010855622720300105s +Avg time for calculating new densities 0.01582607548487814s +Time of simulation: 24.622382164001465s +Execution for Von Neuman expression: 0.0012149810791015625s +Number of steps: 912 +Avg time for inserting track step: 0.06169898912572024s +Avg time for calculating new densities 0.014564422661798042s +Time of simulation: 69.83315849304199s +Execution for Von Neuman expression: 0.0012443065643310547s +Number of steps: 912 +Avg time for inserting track step: 0.03025148704386594s +Avg time for calculating new densities 0.01513074939711052s +Time of simulation: 41.66603446006775s +Execution for Von Neuman expression: 0.0014290809631347656s +Number of steps: 912 +Avg time for inserting track step: 0.01228895156007064s +Avg time for calculating new densities 0.015036037877986306s +Time of simulation: 25.20314383506775s +Execution for Von Neuman expression: 0.001443624496459961s +Number of steps: 912 +Avg time for inserting track step: 0.0034366783342863385s +Avg time for calculating new densities 0.015552081559833727s +Time of simulation: 17.618234395980835s + +Continuous Beam Comparison: + Energy_MeV dose_rate_air_Gy_s k_s k_s_IonTracks difference relative_error_% + 70 0.823 1.0006 1.001392 0.000792 0.079 + 150 0.762 1.0005 1.001015 0.000515 0.051 + 150 1.866 1.0013 1.002133 0.000833 0.083 + 150 3.665 1.0025 1.003770 0.001270 0.127 + 226 1.122 1.0008 1.001324 0.000524 0.052 + 226 2.877 1.0019 1.002978 0.001078 0.108 + 226 5.610 1.0038 1.005651 0.001851 0.184 + 244 1.207 1.0008 1.001387 0.000587 0.059 + 244 2.978 1.0020 1.003115 0.001115 0.111 + 244 6.103 1.0041 1.006070 0.001970 0.196 + +=== Error Statistics === +Number of successful calculations: 10/10 +Mean absolute error: 0.001054 +Mean relative error: 0.105% +Median relative error: 0.095% +Max relative error: 0.196% +Min relative error: 0.051% +Standard deviation: 0.052% + +====================================================================== +GENERATING PLOTS +====================================================================== +[OK] Saved: initial_recombination_comparison.png +[OK] Saved: continuous_beam_comparison.png +[OK] Saved: relative_error.png + +====================================================================== +SAVING RESULTS +====================================================================== +[OK] Saved: comparison_initial.csv +[OK] Saved: comparison_continuous.csv + NOTE: Calculations used dose_rate_air_Gy_s (not dose_rate_water_Gy_s) +[OK] Saved: comparison_continuous_clean.csv (essential columns only) + +All results saved in: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_002 + +====================================================================== +TESTING COMPLETED +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_003/comparison_continuous.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_003/comparison_continuous.csv new file mode 100644 index 0000000..8f35e46 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_003/comparison_continuous.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_Gy,dose_rate_factor,time_s,dose_rate_water_Gy_s,dose_rate_air_Gy_s,k_s,dose_rate_air_Gy_min,k_s_IonTracks,difference,relative_error_%,absolute_error +150,0.672,1.0,0.004184,4.167,3.665,1.0025,219.9,1.0037096130478254,0.0012096130478254086,0.12065965564343228,0.0012096130478254086 +150,0.672,0.5,0.008216,2.122,1.866,1.0013,111.96000000000001,1.0020898282813027,0.0007898282813025848,0.07888028376136869,0.0007898282813025848 +150,0.672,0.2,0.020117,0.867,0.762,1.0005,45.72,1.0011607076824003,0.0006607076824003411,0.06603774936535144,0.0006607076824003411 +226,0.673,1.0,0.00277,6.378,5.61,1.0038,336.6,1.0054572144386142,0.0016572144386142185,0.1650940863333551,0.0016572144386142185 +226,0.673,0.5,0.005401,3.271,2.877,1.0019,172.61999999999998,1.0028920906670014,0.000992090667001344,0.0990209269389504,0.000992090667001344 +226,0.673,0.2,0.013849,1.276,1.122,1.0008,67.32000000000001,1.0013406622215113,0.0005406622215113899,0.05402300374814048,0.0005406622215113899 +244,0.676,1.0,0.002562,6.939,6.103,1.0041,366.18,1.0058881560382005,0.0017881560382004835,0.17808545346085883,0.0017881560382004835 +244,0.676,0.5,0.00525,3.386,2.978,1.002,178.68,1.0030058611192818,0.0010058611192818034,0.10038534124568897,0.0010058611192818034 +244,0.676,0.2,0.012956,1.372,1.207,1.0008,72.42,1.0013452749606988,0.0005452749606988938,0.0544839089427352,0.0005452749606988938 +70,0.825,1.0,0.022265,0.936,0.823,1.0006,49.379999999999995,1.0013792609801282,0.0007792609801282602,0.07787937039059167,0.0007792609801282602 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_003/comparison_continuous_clean.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_003/comparison_continuous_clean.csv new file mode 100644 index 0000000..94234a2 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_003/comparison_continuous_clean.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_rate_air_Gy_s,k_s,k_s_IonTracks,difference,relative_error_%,absolute_error +150,3.665,1.0025,1.0037096130478254,0.0012096130478254086,0.12065965564343228,0.0012096130478254086 +150,1.866,1.0013,1.0020898282813027,0.0007898282813025848,0.07888028376136869,0.0007898282813025848 +150,0.762,1.0005,1.0011607076824003,0.0006607076824003411,0.06603774936535144,0.0006607076824003411 +226,5.61,1.0038,1.0054572144386142,0.0016572144386142185,0.1650940863333551,0.0016572144386142185 +226,2.877,1.0019,1.0028920906670014,0.000992090667001344,0.0990209269389504,0.000992090667001344 +226,1.122,1.0008,1.0013406622215113,0.0005406622215113899,0.05402300374814048,0.0005406622215113899 +244,6.103,1.0041,1.0058881560382005,0.0017881560382004835,0.17808545346085883,0.0017881560382004835 +244,2.978,1.002,1.0030058611192818,0.0010058611192818034,0.10038534124568897,0.0010058611192818034 +244,1.207,1.0008,1.0013452749606988,0.0005452749606988938,0.0544839089427352,0.0005452749606988938 +70,0.823,1.0006,1.0013792609801282,0.0007792609801282602,0.07787937039059167,0.0007792609801282602 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_003/comparison_initial.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_003/comparison_initial.csv new file mode 100644 index 0000000..38b36b4 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_003/comparison_initial.csv @@ -0,0 +1,5 @@ +Energy_MeV,k_s_experimental,k_s_IonTracks,difference,relative_error_% +70,1.0006,1.0003619141760138,-0.00023808582398610056,-0.023794305815120986 +150,1.0005,1.0002065945483714,-0.0002934054516285922,-0.02932588222174835 +226,1.0008,1.0001579920055679,-0.0006420079944320367,-0.06414947985931622 +244,1.0008,1.0001507878033964,-0.0006492121966035214,-0.06486932420099135 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_003/continuous_beam_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_003/continuous_beam_comparison.png new file mode 100644 index 0000000..00783f1 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_003/continuous_beam_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_003/initial_recombination_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_003/initial_recombination_comparison.png new file mode 100644 index 0000000..cf58903 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_003/initial_recombination_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_003/relative_error.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_003/relative_error.png new file mode 100644 index 0000000..9eb1a5e Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_003/relative_error.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_003/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_003/run_log.txt new file mode 100644 index 0000000..e19c273 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_003/run_log.txt @@ -0,0 +1,134 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend numba --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_003 +Return code: 0 +Elapsed time: 408.43 seconds + +====================================================================== +STDOUT: +====================================================================== +====================================================================== +TESTING EXPERIMENTAL DATA DCPT 2019 +====================================================================== + +Loaded 10 experimental measurements +Energies: [np.int64(70), np.int64(150), np.int64(226), np.int64(244)] MeV +Voltage: 200 V +Electrode gap: 0.2 cm + +====================================================================== +METHOD 1: INITIAL RECOMBINATION +====================================================================== +Calculating for 70 MeV... +Calculating for 150 MeV... +Calculating for 226 MeV... +Calculating for 244 MeV... + +Initial Recombination Comparison: + Energy_MeV k_s_experimental k_s_IonTracks difference relative_error_% + 70 1.0006 1.000362 -0.000238 -0.023794 + 150 1.0005 1.000207 -0.000293 -0.029326 + 226 1.0008 1.000158 -0.000642 -0.064149 + 244 1.0008 1.000151 -0.000649 -0.064869 + +====================================================================== +METHOD 2: CONTINUOUS BEAM (General Recombination) +====================================================================== +WARNING: This may take several minutes... +Progress: 1/10 (10.0%) +Execution for Von Neuman expression: 0.0009682178497314453s +Number of steps: 912 +Avg time for inserting track step: 0.027899486192485744s +Avg time for calculating new densities 0.015027227893210295s +Time of simulation: 39.44415855407715s +Execution for Von Neuman expression: 0.0021343231201171875s +Number of steps: 912 +Avg time for inserting track step: 0.013801403212965581s +Avg time for calculating new densities 0.015449402363676774s +Time of simulation: 26.970541954040527s +Execution for Von Neuman expression: 0.0012097358703613281s +Number of steps: 912 +Avg time for inserting track step: 0.005832565981045104s +Avg time for calculating new densities 0.015341302020507947s +Time of simulation: 19.596861600875854s +Execution for Von Neuman expression: 0.0012454986572265625s +Number of steps: 912 +Avg time for inserting track step: 0.05476738224949753s +Avg time for calculating new densities 0.014804139733314514s +Time of simulation: 63.72614288330078s +Execution for Von Neuman expression: 0.0012450218200683594s +Number of steps: 912 +Avg time for inserting track step: 0.027963572688270034s +Avg time for calculating new densities 0.01823653803582777s +Time of simulation: 42.41682171821594s +Progress: 6/10 (60.0%) +Execution for Von Neuman expression: 0.0009129047393798828s +Number of steps: 912 +Avg time for inserting track step: 0.010844233527518156s +Avg time for calculating new densities 0.015541848383451762s +Time of simulation: 24.344539880752563s +Execution for Von Neuman expression: 0.001378774642944336s +Number of steps: 912 +Avg time for inserting track step: 0.06253033275144142s +Avg time for calculating new densities 0.01529576930037716s +Time of simulation: 71.26507425308228s +Execution for Von Neuman expression: 0.002169370651245117s +Number of steps: 912 +Avg time for inserting track step: 0.033825423372419255s +Avg time for calculating new densities 0.017368302272077193s +Time of simulation: 47.02762842178345s +Execution for Von Neuman expression: 0.0015039443969726562s +Number of steps: 912 +Avg time for inserting track step: 0.013476912389721787s +Avg time for calculating new densities 0.017626262809100905s +Time of simulation: 28.821756601333618s +Execution for Von Neuman expression: 0.0016732215881347656s +Number of steps: 912 +Avg time for inserting track step: 0.004062146732681676s +Avg time for calculating new densities 0.018465478169290644s +Time of simulation: 20.9142165184021s + +Continuous Beam Comparison: + Energy_MeV dose_rate_air_Gy_s k_s k_s_IonTracks difference relative_error_% + 70 0.823 1.0006 1.001379 0.000779 0.078 + 150 0.762 1.0005 1.001161 0.000661 0.066 + 150 1.866 1.0013 1.002090 0.000790 0.079 + 150 3.665 1.0025 1.003710 0.001210 0.121 + 226 1.122 1.0008 1.001341 0.000541 0.054 + 226 2.877 1.0019 1.002892 0.000992 0.099 + 226 5.610 1.0038 1.005457 0.001657 0.165 + 244 1.207 1.0008 1.001345 0.000545 0.054 + 244 2.978 1.0020 1.003006 0.001006 0.100 + 244 6.103 1.0041 1.005888 0.001788 0.178 + +=== Error Statistics === +Number of successful calculations: 10/10 +Mean absolute error: 0.000997 +Mean relative error: 0.099% +Median relative error: 0.089% +Max relative error: 0.178% +Min relative error: 0.054% +Standard deviation: 0.044% + +====================================================================== +GENERATING PLOTS +====================================================================== +[OK] Saved: initial_recombination_comparison.png +[OK] Saved: continuous_beam_comparison.png +[OK] Saved: relative_error.png + +====================================================================== +SAVING RESULTS +====================================================================== +[OK] Saved: comparison_initial.csv +[OK] Saved: comparison_continuous.csv + NOTE: Calculations used dose_rate_air_Gy_s (not dose_rate_water_Gy_s) +[OK] Saved: comparison_continuous_clean.csv (essential columns only) + +All results saved in: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_003 + +====================================================================== +TESTING COMPLETED +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_004/comparison_continuous.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_004/comparison_continuous.csv new file mode 100644 index 0000000..7bbae95 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_004/comparison_continuous.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_Gy,dose_rate_factor,time_s,dose_rate_water_Gy_s,dose_rate_air_Gy_s,k_s,dose_rate_air_Gy_min,k_s_IonTracks,difference,relative_error_%,absolute_error +150,0.672,1.0,0.004184,4.167,3.665,1.0025,219.9,1.0037822352781702,0.001282235278170285,0.12790376839603843,0.001282235278170285 +150,0.672,0.5,0.008216,2.122,1.866,1.0013,111.96000000000001,1.0019906759623607,0.0006906759623606096,0.06897792493364721,0.0006906759623606096 +150,0.672,0.2,0.020117,0.867,0.762,1.0005,45.72,1.0009146459336116,0.0004146459336116237,0.04144387142544965,0.0004146459336116237 +226,0.673,1.0,0.00277,6.378,5.61,1.0038,336.6,1.005548271292308,0.0017482712923080346,0.17416530108667408,0.0017482712923080346 +226,0.673,0.5,0.005401,3.271,2.877,1.0019,172.61999999999998,1.0029517433459376,0.0010517433459376058,0.10497488231735759,0.0010517433459376058 +226,0.673,0.2,0.013849,1.276,1.122,1.0008,67.32000000000001,1.0012250233593072,0.00042502335930727497,0.042468361241734115,0.00042502335930727497 +244,0.676,1.0,0.002562,6.939,6.103,1.0041,366.18,1.0059632370865332,0.0018632370865332426,0.1855629007602074,0.0018632370865332426 +244,0.676,0.5,0.00525,3.386,2.978,1.002,178.68,1.0030547118370159,0.001054711837015887,0.10526066237683503,0.001054711837015887 +244,0.676,0.2,0.012956,1.372,1.207,1.0008,72.42,1.0013300897196624,0.0005300897196625076,0.05296659868730093,0.0005300897196625076 +70,0.825,1.0,0.022265,0.936,0.823,1.0006,49.379999999999995,1.0011201579311169,0.0005201579311169269,0.05198460235028252,0.0005201579311169269 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_004/comparison_continuous_clean.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_004/comparison_continuous_clean.csv new file mode 100644 index 0000000..2cf32fa --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_004/comparison_continuous_clean.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_rate_air_Gy_s,k_s,k_s_IonTracks,difference,relative_error_%,absolute_error +150,3.665,1.0025,1.0037822352781702,0.001282235278170285,0.12790376839603843,0.001282235278170285 +150,1.866,1.0013,1.0019906759623607,0.0006906759623606096,0.06897792493364721,0.0006906759623606096 +150,0.762,1.0005,1.0009146459336116,0.0004146459336116237,0.04144387142544965,0.0004146459336116237 +226,5.61,1.0038,1.005548271292308,0.0017482712923080346,0.17416530108667408,0.0017482712923080346 +226,2.877,1.0019,1.0029517433459376,0.0010517433459376058,0.10497488231735759,0.0010517433459376058 +226,1.122,1.0008,1.0012250233593072,0.00042502335930727497,0.042468361241734115,0.00042502335930727497 +244,6.103,1.0041,1.0059632370865332,0.0018632370865332426,0.1855629007602074,0.0018632370865332426 +244,2.978,1.002,1.0030547118370159,0.001054711837015887,0.10526066237683503,0.001054711837015887 +244,1.207,1.0008,1.0013300897196624,0.0005300897196625076,0.05296659868730093,0.0005300897196625076 +70,0.823,1.0006,1.0011201579311169,0.0005201579311169269,0.05198460235028252,0.0005201579311169269 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_004/comparison_initial.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_004/comparison_initial.csv new file mode 100644 index 0000000..38b36b4 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_004/comparison_initial.csv @@ -0,0 +1,5 @@ +Energy_MeV,k_s_experimental,k_s_IonTracks,difference,relative_error_% +70,1.0006,1.0003619141760138,-0.00023808582398610056,-0.023794305815120986 +150,1.0005,1.0002065945483714,-0.0002934054516285922,-0.02932588222174835 +226,1.0008,1.0001579920055679,-0.0006420079944320367,-0.06414947985931622 +244,1.0008,1.0001507878033964,-0.0006492121966035214,-0.06486932420099135 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_004/continuous_beam_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_004/continuous_beam_comparison.png new file mode 100644 index 0000000..55b8f69 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_004/continuous_beam_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_004/initial_recombination_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_004/initial_recombination_comparison.png new file mode 100644 index 0000000..cf58903 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_004/initial_recombination_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_004/relative_error.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_004/relative_error.png new file mode 100644 index 0000000..fcd4810 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_004/relative_error.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_004/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_004/run_log.txt new file mode 100644 index 0000000..cb35b2a --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_004/run_log.txt @@ -0,0 +1,134 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend numba --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_004 +Return code: 0 +Elapsed time: 420.40 seconds + +====================================================================== +STDOUT: +====================================================================== +====================================================================== +TESTING EXPERIMENTAL DATA DCPT 2019 +====================================================================== + +Loaded 10 experimental measurements +Energies: [np.int64(70), np.int64(150), np.int64(226), np.int64(244)] MeV +Voltage: 200 V +Electrode gap: 0.2 cm + +====================================================================== +METHOD 1: INITIAL RECOMBINATION +====================================================================== +Calculating for 70 MeV... +Calculating for 150 MeV... +Calculating for 226 MeV... +Calculating for 244 MeV... + +Initial Recombination Comparison: + Energy_MeV k_s_experimental k_s_IonTracks difference relative_error_% + 70 1.0006 1.000362 -0.000238 -0.023794 + 150 1.0005 1.000207 -0.000293 -0.029326 + 226 1.0008 1.000158 -0.000642 -0.064149 + 244 1.0008 1.000151 -0.000649 -0.064869 + +====================================================================== +METHOD 2: CONTINUOUS BEAM (General Recombination) +====================================================================== +WARNING: This may take several minutes... +Progress: 1/10 (10.0%) +Execution for Von Neuman expression: 0.0018582344055175781s +Number of steps: 912 +Avg time for inserting track step: 0.030774315982534176s +Avg time for calculating new densities 0.018445378071383425s +Time of simulation: 45.22453999519348s +Execution for Von Neuman expression: 0.0020699501037597656s +Number of steps: 912 +Avg time for inserting track step: 0.015229049743267527s +Avg time for calculating new densities 0.01905096439938796s +Time of simulation: 31.619789123535156s +Execution for Von Neuman expression: 0.001409769058227539s +Number of steps: 912 +Avg time for inserting track step: 0.006314593187549658s +Avg time for calculating new densities 0.01773999343838608s +Time of simulation: 22.278405904769897s +Execution for Von Neuman expression: 0.0013689994812011719s +Number of steps: 912 +Avg time for inserting track step: 0.05973370817669651s +Avg time for calculating new densities 0.016366995740355106s +Time of simulation: 69.74412727355957s +Execution for Von Neuman expression: 0.001207113265991211s +Number of steps: 912 +Avg time for inserting track step: 0.02845395630911777s +Avg time for calculating new densities 0.01523890725353308s +Time of simulation: 40.16447901725769s +Progress: 6/10 (60.0%) +Execution for Von Neuman expression: 0.0011692047119140625s +Number of steps: 912 +Avg time for inserting track step: 0.011110901309732805s +Avg time for calculating new densities 0.015828075900412443s +Time of simulation: 24.867412567138672s +Execution for Von Neuman expression: 0.001264810562133789s +Number of steps: 912 +Avg time for inserting track step: 0.06477756955121693s +Avg time for calculating new densities 0.015433603211453087s +Time of simulation: 73.46203708648682s +Execution for Von Neuman expression: 0.0013189315795898438s +Number of steps: 912 +Avg time for inserting track step: 0.03062694323690314s +Avg time for calculating new densities 0.015226116044479505s +Time of simulation: 42.109434366226196s +Execution for Von Neuman expression: 0.0012140274047851562s +Number of steps: 912 +Avg time for inserting track step: 0.012364389865021957s +Avg time for calculating new densities 0.015818717709758824s +Time of simulation: 25.98146414756775s +Execution for Von Neuman expression: 0.0013949871063232422s +Number of steps: 912 +Avg time for inserting track step: 0.0034488400346354433s +Avg time for calculating new densities 0.01527471657384906s +Time of simulation: 17.37212038040161s + +Continuous Beam Comparison: + Energy_MeV dose_rate_air_Gy_s k_s k_s_IonTracks difference relative_error_% + 70 0.823 1.0006 1.001120 0.000520 0.052 + 150 0.762 1.0005 1.000915 0.000415 0.041 + 150 1.866 1.0013 1.001991 0.000691 0.069 + 150 3.665 1.0025 1.003782 0.001282 0.128 + 226 1.122 1.0008 1.001225 0.000425 0.042 + 226 2.877 1.0019 1.002952 0.001052 0.105 + 226 5.610 1.0038 1.005548 0.001748 0.174 + 244 1.207 1.0008 1.001330 0.000530 0.053 + 244 2.978 1.0020 1.003055 0.001055 0.105 + 244 6.103 1.0041 1.005963 0.001863 0.186 + +=== Error Statistics === +Number of successful calculations: 10/10 +Mean absolute error: 0.000958 +Mean relative error: 0.096% +Median relative error: 0.087% +Max relative error: 0.186% +Min relative error: 0.041% +Standard deviation: 0.053% + +====================================================================== +GENERATING PLOTS +====================================================================== +[OK] Saved: initial_recombination_comparison.png +[OK] Saved: continuous_beam_comparison.png +[OK] Saved: relative_error.png + +====================================================================== +SAVING RESULTS +====================================================================== +[OK] Saved: comparison_initial.csv +[OK] Saved: comparison_continuous.csv + NOTE: Calculations used dose_rate_air_Gy_s (not dose_rate_water_Gy_s) +[OK] Saved: comparison_continuous_clean.csv (essential columns only) + +All results saved in: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_004 + +====================================================================== +TESTING COMPLETED +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_005/comparison_continuous.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_005/comparison_continuous.csv new file mode 100644 index 0000000..f71d84a --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_005/comparison_continuous.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_Gy,dose_rate_factor,time_s,dose_rate_water_Gy_s,dose_rate_air_Gy_s,k_s,dose_rate_air_Gy_min,k_s_IonTracks,difference,relative_error_%,absolute_error +150,0.672,1.0,0.004184,4.167,3.665,1.0025,219.9,1.003798935855452,0.0012989358554520436,0.12956966139172504,0.0012989358554520436 +150,0.672,0.5,0.008216,2.122,1.866,1.0013,111.96000000000001,1.0021578982235473,0.0008578982235472044,0.08567844038222354,0.0008578982235472044 +150,0.672,0.2,0.020117,0.867,0.762,1.0005,45.72,1.0009456963255627,0.00044569632556279437,0.04454735887684102,0.00044569632556279437 +226,0.673,1.0,0.00277,6.378,5.61,1.0038,336.6,1.0055271686911795,0.0017271686911795037,0.17206302960544964,0.0017271686911795037 +226,0.673,0.5,0.005401,3.271,2.877,1.0019,172.61999999999998,1.0029778934348272,0.0010778934348272262,0.10758493211171037,0.0010778934348272262 +226,0.673,0.2,0.013849,1.276,1.122,1.0008,67.32000000000001,1.0013251572057882,0.0005251572057882736,0.05247374158555892,0.0005251572057882736 +244,0.676,1.0,0.002562,6.939,6.103,1.0041,366.18,1.0059448479024553,0.0018448479024553155,0.1837314911318908,0.0018448479024553155 +244,0.676,0.5,0.00525,3.386,2.978,1.002,178.68,1.003055996208216,0.001055996208215948,0.10538884313532415,0.001055996208215948 +244,0.676,0.2,0.012956,1.372,1.207,1.0008,72.42,1.001449347500798,0.0006493475007980365,0.06488284380475985,0.0006493475007980365 +70,0.825,1.0,0.022265,0.936,0.823,1.0006,49.379999999999995,1.0010420191764147,0.0004420191764147319,0.044175412394036766,0.0004420191764147319 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_005/comparison_continuous_clean.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_005/comparison_continuous_clean.csv new file mode 100644 index 0000000..ed72d2d --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_005/comparison_continuous_clean.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_rate_air_Gy_s,k_s,k_s_IonTracks,difference,relative_error_%,absolute_error +150,3.665,1.0025,1.003798935855452,0.0012989358554520436,0.12956966139172504,0.0012989358554520436 +150,1.866,1.0013,1.0021578982235473,0.0008578982235472044,0.08567844038222354,0.0008578982235472044 +150,0.762,1.0005,1.0009456963255627,0.00044569632556279437,0.04454735887684102,0.00044569632556279437 +226,5.61,1.0038,1.0055271686911795,0.0017271686911795037,0.17206302960544964,0.0017271686911795037 +226,2.877,1.0019,1.0029778934348272,0.0010778934348272262,0.10758493211171037,0.0010778934348272262 +226,1.122,1.0008,1.0013251572057882,0.0005251572057882736,0.05247374158555892,0.0005251572057882736 +244,6.103,1.0041,1.0059448479024553,0.0018448479024553155,0.1837314911318908,0.0018448479024553155 +244,2.978,1.002,1.003055996208216,0.001055996208215948,0.10538884313532415,0.001055996208215948 +244,1.207,1.0008,1.001449347500798,0.0006493475007980365,0.06488284380475985,0.0006493475007980365 +70,0.823,1.0006,1.0010420191764147,0.0004420191764147319,0.044175412394036766,0.0004420191764147319 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_005/comparison_initial.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_005/comparison_initial.csv new file mode 100644 index 0000000..38b36b4 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_005/comparison_initial.csv @@ -0,0 +1,5 @@ +Energy_MeV,k_s_experimental,k_s_IonTracks,difference,relative_error_% +70,1.0006,1.0003619141760138,-0.00023808582398610056,-0.023794305815120986 +150,1.0005,1.0002065945483714,-0.0002934054516285922,-0.02932588222174835 +226,1.0008,1.0001579920055679,-0.0006420079944320367,-0.06414947985931622 +244,1.0008,1.0001507878033964,-0.0006492121966035214,-0.06486932420099135 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_005/continuous_beam_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_005/continuous_beam_comparison.png new file mode 100644 index 0000000..ea82ab4 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_005/continuous_beam_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_005/initial_recombination_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_005/initial_recombination_comparison.png new file mode 100644 index 0000000..cf58903 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_005/initial_recombination_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_005/relative_error.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_005/relative_error.png new file mode 100644 index 0000000..ade9c62 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_005/relative_error.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_005/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_005/run_log.txt new file mode 100644 index 0000000..7039894 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_005/run_log.txt @@ -0,0 +1,134 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend numba --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_005 +Return code: 0 +Elapsed time: 413.33 seconds + +====================================================================== +STDOUT: +====================================================================== +====================================================================== +TESTING EXPERIMENTAL DATA DCPT 2019 +====================================================================== + +Loaded 10 experimental measurements +Energies: [np.int64(70), np.int64(150), np.int64(226), np.int64(244)] MeV +Voltage: 200 V +Electrode gap: 0.2 cm + +====================================================================== +METHOD 1: INITIAL RECOMBINATION +====================================================================== +Calculating for 70 MeV... +Calculating for 150 MeV... +Calculating for 226 MeV... +Calculating for 244 MeV... + +Initial Recombination Comparison: + Energy_MeV k_s_experimental k_s_IonTracks difference relative_error_% + 70 1.0006 1.000362 -0.000238 -0.023794 + 150 1.0005 1.000207 -0.000293 -0.029326 + 226 1.0008 1.000158 -0.000642 -0.064149 + 244 1.0008 1.000151 -0.000649 -0.064869 + +====================================================================== +METHOD 2: CONTINUOUS BEAM (General Recombination) +====================================================================== +WARNING: This may take several minutes... +Progress: 1/10 (10.0%) +Execution for Von Neuman expression: 0.0008955001831054688s +Number of steps: 912 +Avg time for inserting track step: 0.028610694826694958s +Avg time for calculating new densities 0.017854639051253337s +Time of simulation: 42.66621208190918s +Execution for Von Neuman expression: 0.0012392997741699219s +Number of steps: 912 +Avg time for inserting track step: 0.01379952723519844s +Avg time for calculating new densities 0.015674286244208354s +Time of simulation: 27.17522931098938s +Execution for Von Neuman expression: 0.0013163089752197266s +Number of steps: 912 +Avg time for inserting track step: 0.005644256869951884s +Avg time for calculating new densities 0.0151633269954146s +Time of simulation: 19.25932502746582s +Execution for Von Neuman expression: 0.0013194084167480469s +Number of steps: 912 +Avg time for inserting track step: 0.05572877196889175s +Avg time for calculating new densities 0.018061788981420954s +Time of simulation: 67.59081172943115s +Execution for Von Neuman expression: 0.0022008419036865234s +Number of steps: 912 +Avg time for inserting track step: 0.030558891202274122s +Avg time for calculating new densities 0.01623600721359253s +Time of simulation: 43.150249004364014s +Progress: 6/10 (60.0%) +Execution for Von Neuman expression: 0.0013151168823242188s +Number of steps: 912 +Avg time for inserting track step: 0.010905791792953224s +Avg time for calculating new densities 0.015661323018241347s +Time of simulation: 24.515773057937622s +Execution for Von Neuman expression: 0.000942230224609375s +Number of steps: 912 +Avg time for inserting track step: 0.06243453031046349s +Avg time for calculating new densities 0.014576247909612823s +Time of simulation: 70.51947283744812s +Execution for Von Neuman expression: 0.0012257099151611328s +Number of steps: 912 +Avg time for inserting track step: 0.030627456411980745s +Avg time for calculating new densities 0.015936195850372314s +Time of simulation: 42.767372608184814s +Execution for Von Neuman expression: 0.00200653076171875s +Number of steps: 912 +Avg time for inserting track step: 0.012195718915838944s +Avg time for calculating new densities 0.0151792283643756s +Time of simulation: 25.30649733543396s +Execution for Von Neuman expression: 0.001291513442993164s +Number of steps: 912 +Avg time for inserting track step: 0.003504141380912379s +Avg time for calculating new densities 0.01557185409361856s +Time of simulation: 17.681146144866943s + +Continuous Beam Comparison: + Energy_MeV dose_rate_air_Gy_s k_s k_s_IonTracks difference relative_error_% + 70 0.823 1.0006 1.001042 0.000442 0.044 + 150 0.762 1.0005 1.000946 0.000446 0.045 + 150 1.866 1.0013 1.002158 0.000858 0.086 + 150 3.665 1.0025 1.003799 0.001299 0.130 + 226 1.122 1.0008 1.001325 0.000525 0.052 + 226 2.877 1.0019 1.002978 0.001078 0.108 + 226 5.610 1.0038 1.005527 0.001727 0.172 + 244 1.207 1.0008 1.001449 0.000649 0.065 + 244 2.978 1.0020 1.003056 0.001056 0.105 + 244 6.103 1.0041 1.005945 0.001845 0.184 + +=== Error Statistics === +Number of successful calculations: 10/10 +Mean absolute error: 0.000992 +Mean relative error: 0.099% +Median relative error: 0.096% +Max relative error: 0.184% +Min relative error: 0.044% +Standard deviation: 0.051% + +====================================================================== +GENERATING PLOTS +====================================================================== +[OK] Saved: initial_recombination_comparison.png +[OK] Saved: continuous_beam_comparison.png +[OK] Saved: relative_error.png + +====================================================================== +SAVING RESULTS +====================================================================== +[OK] Saved: comparison_initial.csv +[OK] Saved: comparison_continuous.csv + NOTE: Calculations used dose_rate_air_Gy_s (not dose_rate_water_Gy_s) +[OK] Saved: comparison_continuous_clean.csv (essential columns only) + +All results saved in: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_005 + +====================================================================== +TESTING COMPLETED +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_006/comparison_continuous.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_006/comparison_continuous.csv new file mode 100644 index 0000000..2acafe5 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_006/comparison_continuous.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_Gy,dose_rate_factor,time_s,dose_rate_water_Gy_s,dose_rate_air_Gy_s,k_s,dose_rate_air_Gy_min,k_s_IonTracks,difference,relative_error_%,absolute_error +150,0.672,1.0,0.004184,4.167,3.665,1.0025,219.9,1.0037794793546058,0.001279479354605817,0.1276288633023259,0.001279479354605817 +150,0.672,0.5,0.008216,2.122,1.866,1.0013,111.96000000000001,1.0020579676147379,0.0007579676147377867,0.07569835361408037,0.0007579676147377867 +150,0.672,0.2,0.020117,0.867,0.762,1.0005,45.72,1.0009447661035489,0.00044476610354893253,0.0444543831633116,0.00044476610354893253 +226,0.673,1.0,0.00277,6.378,5.61,1.0038,336.6,1.00563642076121,0.0018364207612100447,0.18294687798466275,0.0018364207612100447 +226,0.673,0.5,0.005401,3.271,2.877,1.0019,172.61999999999998,1.0029781275095708,0.0010781275095708143,0.10760829519620863,0.0010781275095708143 +226,0.673,0.2,0.013849,1.276,1.122,1.0008,67.32000000000001,1.0013097538999474,0.0005097538999474516,0.05093464228092043,0.0005097538999474516 +244,0.676,1.0,0.002562,6.939,6.103,1.0041,366.18,1.0061166592156185,0.0020166592156185548,0.20084246744532963,0.0020166592156185548 +244,0.676,0.5,0.00525,3.386,2.978,1.002,178.68,1.0030685399813095,0.0010685399813095131,0.1066407166975562,0.0010685399813095131 +244,0.676,0.2,0.012956,1.372,1.207,1.0008,72.42,1.0013604908027345,0.0005604908027345701,0.05600427685197543,0.0005604908027345701 +70,0.825,1.0,0.022265,0.936,0.823,1.0006,49.379999999999995,1.0012453691747825,0.0006453691747825285,0.06449821854712458,0.0006453691747825285 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_006/comparison_continuous_clean.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_006/comparison_continuous_clean.csv new file mode 100644 index 0000000..4a916c1 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_006/comparison_continuous_clean.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_rate_air_Gy_s,k_s,k_s_IonTracks,difference,relative_error_%,absolute_error +150,3.665,1.0025,1.0037794793546058,0.001279479354605817,0.1276288633023259,0.001279479354605817 +150,1.866,1.0013,1.0020579676147379,0.0007579676147377867,0.07569835361408037,0.0007579676147377867 +150,0.762,1.0005,1.0009447661035489,0.00044476610354893253,0.0444543831633116,0.00044476610354893253 +226,5.61,1.0038,1.00563642076121,0.0018364207612100447,0.18294687798466275,0.0018364207612100447 +226,2.877,1.0019,1.0029781275095708,0.0010781275095708143,0.10760829519620863,0.0010781275095708143 +226,1.122,1.0008,1.0013097538999474,0.0005097538999474516,0.05093464228092043,0.0005097538999474516 +244,6.103,1.0041,1.0061166592156185,0.0020166592156185548,0.20084246744532963,0.0020166592156185548 +244,2.978,1.002,1.0030685399813095,0.0010685399813095131,0.1066407166975562,0.0010685399813095131 +244,1.207,1.0008,1.0013604908027345,0.0005604908027345701,0.05600427685197543,0.0005604908027345701 +70,0.823,1.0006,1.0012453691747825,0.0006453691747825285,0.06449821854712458,0.0006453691747825285 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_006/comparison_initial.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_006/comparison_initial.csv new file mode 100644 index 0000000..38b36b4 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_006/comparison_initial.csv @@ -0,0 +1,5 @@ +Energy_MeV,k_s_experimental,k_s_IonTracks,difference,relative_error_% +70,1.0006,1.0003619141760138,-0.00023808582398610056,-0.023794305815120986 +150,1.0005,1.0002065945483714,-0.0002934054516285922,-0.02932588222174835 +226,1.0008,1.0001579920055679,-0.0006420079944320367,-0.06414947985931622 +244,1.0008,1.0001507878033964,-0.0006492121966035214,-0.06486932420099135 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_006/continuous_beam_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_006/continuous_beam_comparison.png new file mode 100644 index 0000000..36e044c Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_006/continuous_beam_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_006/initial_recombination_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_006/initial_recombination_comparison.png new file mode 100644 index 0000000..cf58903 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_006/initial_recombination_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_006/relative_error.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_006/relative_error.png new file mode 100644 index 0000000..d149d14 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_006/relative_error.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_006/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_006/run_log.txt new file mode 100644 index 0000000..aa4b5a4 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_006/run_log.txt @@ -0,0 +1,134 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend numba --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_006 +Return code: 0 +Elapsed time: 404.67 seconds + +====================================================================== +STDOUT: +====================================================================== +====================================================================== +TESTING EXPERIMENTAL DATA DCPT 2019 +====================================================================== + +Loaded 10 experimental measurements +Energies: [np.int64(70), np.int64(150), np.int64(226), np.int64(244)] MeV +Voltage: 200 V +Electrode gap: 0.2 cm + +====================================================================== +METHOD 1: INITIAL RECOMBINATION +====================================================================== +Calculating for 70 MeV... +Calculating for 150 MeV... +Calculating for 226 MeV... +Calculating for 244 MeV... + +Initial Recombination Comparison: + Energy_MeV k_s_experimental k_s_IonTracks difference relative_error_% + 70 1.0006 1.000362 -0.000238 -0.023794 + 150 1.0005 1.000207 -0.000293 -0.029326 + 226 1.0008 1.000158 -0.000642 -0.064149 + 244 1.0008 1.000151 -0.000649 -0.064869 + +====================================================================== +METHOD 2: CONTINUOUS BEAM (General Recombination) +====================================================================== +WARNING: This may take several minutes... +Progress: 1/10 (10.0%) +Execution for Von Neuman expression: 0.0008914470672607422s +Number of steps: 912 +Avg time for inserting track step: 0.028156499590790064s +Avg time for calculating new densities 0.0167459976254848s +Time of simulation: 41.236358880996704s +Execution for Von Neuman expression: 0.00090789794921875s +Number of steps: 912 +Avg time for inserting track step: 0.013937681129104212s +Avg time for calculating new densities 0.015083719502415573s +Time of simulation: 26.753337860107422s +Execution for Von Neuman expression: 0.0013778209686279297s +Number of steps: 912 +Avg time for inserting track step: 0.005821123980639274s +Avg time for calculating new densities 0.015390557155274508s +Time of simulation: 19.643974542617798s +Execution for Von Neuman expression: 0.0012888908386230469s +Number of steps: 912 +Avg time for inserting track step: 0.05455861828829113s +Avg time for calculating new densities 0.014500547657933151s +Time of simulation: 63.271233558654785s +Execution for Von Neuman expression: 0.0013589859008789062s +Number of steps: 912 +Avg time for inserting track step: 0.027800949257716798s +Avg time for calculating new densities 0.01808796378604153s +Time of simulation: 42.12941074371338s +Progress: 6/10 (60.0%) +Execution for Von Neuman expression: 0.0012021064758300781s +Number of steps: 912 +Avg time for inserting track step: 0.011033889755868075s +Avg time for calculating new densities 0.01806187969550752s +Time of simulation: 26.818000316619873s +Execution for Von Neuman expression: 0.0012845993041992188s +Number of steps: 912 +Avg time for inserting track step: 0.0626530108744638s +Avg time for calculating new densities 0.017145926753679912s +Time of simulation: 73.0684585571289s +Execution for Von Neuman expression: 0.0013611316680908203s +Number of steps: 912 +Avg time for inserting track step: 0.031160469902189153s +Avg time for calculating new densities 0.015127200306507578s +Time of simulation: 42.51933550834656s +Execution for Von Neuman expression: 0.0013072490692138672s +Number of steps: 912 +Avg time for inserting track step: 0.012429660610985337s +Avg time for calculating new densities 0.015768191793508697s +Time of simulation: 26.000328540802002s +Execution for Von Neuman expression: 0.001268625259399414s +Number of steps: 912 +Avg time for inserting track step: 0.0034398622157280905s +Avg time for calculating new densities 0.016723784176926864s +Time of simulation: 18.685598850250244s + +Continuous Beam Comparison: + Energy_MeV dose_rate_air_Gy_s k_s k_s_IonTracks difference relative_error_% + 70 0.823 1.0006 1.001245 0.000645 0.064 + 150 0.762 1.0005 1.000945 0.000445 0.044 + 150 1.866 1.0013 1.002058 0.000758 0.076 + 150 3.665 1.0025 1.003779 0.001279 0.128 + 226 1.122 1.0008 1.001310 0.000510 0.051 + 226 2.877 1.0019 1.002978 0.001078 0.108 + 226 5.610 1.0038 1.005636 0.001836 0.183 + 244 1.207 1.0008 1.001360 0.000560 0.056 + 244 2.978 1.0020 1.003069 0.001069 0.107 + 244 6.103 1.0041 1.006117 0.002017 0.201 + +=== Error Statistics === +Number of successful calculations: 10/10 +Mean absolute error: 0.001020 +Mean relative error: 0.102% +Median relative error: 0.091% +Max relative error: 0.201% +Min relative error: 0.044% +Standard deviation: 0.055% + +====================================================================== +GENERATING PLOTS +====================================================================== +[OK] Saved: initial_recombination_comparison.png +[OK] Saved: continuous_beam_comparison.png +[OK] Saved: relative_error.png + +====================================================================== +SAVING RESULTS +====================================================================== +[OK] Saved: comparison_initial.csv +[OK] Saved: comparison_continuous.csv + NOTE: Calculations used dose_rate_air_Gy_s (not dose_rate_water_Gy_s) +[OK] Saved: comparison_continuous_clean.csv (essential columns only) + +All results saved in: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_006 + +====================================================================== +TESTING COMPLETED +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_007/comparison_continuous.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_007/comparison_continuous.csv new file mode 100644 index 0000000..a4e526b --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_007/comparison_continuous.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_Gy,dose_rate_factor,time_s,dose_rate_water_Gy_s,dose_rate_air_Gy_s,k_s,dose_rate_air_Gy_min,k_s_IonTracks,difference,relative_error_%,absolute_error +150,0.672,1.0,0.004184,4.167,3.665,1.0025,219.9,1.0036641975491052,0.0011641975491052392,0.11612943133219344,0.0011641975491052392 +150,0.672,0.5,0.008216,2.122,1.866,1.0013,111.96000000000001,1.002019931771444,0.0007199317714439157,0.07189970752460957,0.0007199317714439157 +150,0.672,0.2,0.020117,0.867,0.762,1.0005,45.72,1.0009388090761564,0.0004388090761564545,0.04385897812658216,0.0004388090761564545 +226,0.673,1.0,0.00277,6.378,5.61,1.0038,336.6,1.0055115915895474,0.0017115915895473677,0.1705112163326726,0.0017115915895473677 +226,0.673,0.5,0.005401,3.271,2.877,1.0019,172.61999999999998,1.0028756298322519,0.0009756298322518564,0.09737796509151177,0.0009756298322518564 +226,0.673,0.2,0.013849,1.276,1.122,1.0008,67.32000000000001,1.0012910614644646,0.0004910614644646483,0.04906689293211913,0.0004910614644646483 +244,0.676,1.0,0.002562,6.939,6.103,1.0041,366.18,1.0060380934601183,0.0019380934601183064,0.19301797232529694,0.0019380934601183064 +244,0.676,0.5,0.00525,3.386,2.978,1.002,178.68,1.0030231580081126,0.0010231580081125902,0.10211157765594712,0.0010231580081125902 +244,0.676,0.2,0.012956,1.372,1.207,1.0008,72.42,1.0013504891993994,0.0005504891993994843,0.05500491600714272,0.0005504891993994843 +70,0.825,1.0,0.022265,0.936,0.823,1.0006,49.379999999999995,1.0011274521577647,0.0005274521577647295,0.05271358762389862,0.0005274521577647295 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_007/comparison_continuous_clean.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_007/comparison_continuous_clean.csv new file mode 100644 index 0000000..feafa82 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_007/comparison_continuous_clean.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_rate_air_Gy_s,k_s,k_s_IonTracks,difference,relative_error_%,absolute_error +150,3.665,1.0025,1.0036641975491052,0.0011641975491052392,0.11612943133219344,0.0011641975491052392 +150,1.866,1.0013,1.002019931771444,0.0007199317714439157,0.07189970752460957,0.0007199317714439157 +150,0.762,1.0005,1.0009388090761564,0.0004388090761564545,0.04385897812658216,0.0004388090761564545 +226,5.61,1.0038,1.0055115915895474,0.0017115915895473677,0.1705112163326726,0.0017115915895473677 +226,2.877,1.0019,1.0028756298322519,0.0009756298322518564,0.09737796509151177,0.0009756298322518564 +226,1.122,1.0008,1.0012910614644646,0.0004910614644646483,0.04906689293211913,0.0004910614644646483 +244,6.103,1.0041,1.0060380934601183,0.0019380934601183064,0.19301797232529694,0.0019380934601183064 +244,2.978,1.002,1.0030231580081126,0.0010231580081125902,0.10211157765594712,0.0010231580081125902 +244,1.207,1.0008,1.0013504891993994,0.0005504891993994843,0.05500491600714272,0.0005504891993994843 +70,0.823,1.0006,1.0011274521577647,0.0005274521577647295,0.05271358762389862,0.0005274521577647295 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_007/comparison_initial.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_007/comparison_initial.csv new file mode 100644 index 0000000..38b36b4 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_007/comparison_initial.csv @@ -0,0 +1,5 @@ +Energy_MeV,k_s_experimental,k_s_IonTracks,difference,relative_error_% +70,1.0006,1.0003619141760138,-0.00023808582398610056,-0.023794305815120986 +150,1.0005,1.0002065945483714,-0.0002934054516285922,-0.02932588222174835 +226,1.0008,1.0001579920055679,-0.0006420079944320367,-0.06414947985931622 +244,1.0008,1.0001507878033964,-0.0006492121966035214,-0.06486932420099135 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_007/continuous_beam_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_007/continuous_beam_comparison.png new file mode 100644 index 0000000..be5b7b5 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_007/continuous_beam_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_007/initial_recombination_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_007/initial_recombination_comparison.png new file mode 100644 index 0000000..cf58903 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_007/initial_recombination_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_007/relative_error.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_007/relative_error.png new file mode 100644 index 0000000..beb8e30 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_007/relative_error.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_007/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_007/run_log.txt new file mode 100644 index 0000000..ac5b261 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_007/run_log.txt @@ -0,0 +1,134 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend numba --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_007 +Return code: 0 +Elapsed time: 404.89 seconds + +====================================================================== +STDOUT: +====================================================================== +====================================================================== +TESTING EXPERIMENTAL DATA DCPT 2019 +====================================================================== + +Loaded 10 experimental measurements +Energies: [np.int64(70), np.int64(150), np.int64(226), np.int64(244)] MeV +Voltage: 200 V +Electrode gap: 0.2 cm + +====================================================================== +METHOD 1: INITIAL RECOMBINATION +====================================================================== +Calculating for 70 MeV... +Calculating for 150 MeV... +Calculating for 226 MeV... +Calculating for 244 MeV... + +Initial Recombination Comparison: + Energy_MeV k_s_experimental k_s_IonTracks difference relative_error_% + 70 1.0006 1.000362 -0.000238 -0.023794 + 150 1.0005 1.000207 -0.000293 -0.029326 + 226 1.0008 1.000158 -0.000642 -0.064149 + 244 1.0008 1.000151 -0.000649 -0.064869 + +====================================================================== +METHOD 2: CONTINUOUS BEAM (General Recombination) +====================================================================== +WARNING: This may take several minutes... +Progress: 1/10 (10.0%) +Execution for Von Neuman expression: 0.001262664794921875s +Number of steps: 912 +Avg time for inserting track step: 0.028012456078278392s +Avg time for calculating new densities 0.019223936294254503s +Time of simulation: 43.356924057006836s +Execution for Von Neuman expression: 0.001338958740234375s +Number of steps: 912 +Avg time for inserting track step: 0.013716176936500952s +Avg time for calculating new densities 0.01582906538980049s +Time of simulation: 27.225196599960327s +Execution for Von Neuman expression: 0.0014636516571044922s +Number of steps: 912 +Avg time for inserting track step: 0.0056947506310647s +Avg time for calculating new densities 0.015022240448416326s +Time of simulation: 19.238581895828247s +Execution for Von Neuman expression: 0.0012578964233398438s +Number of steps: 912 +Avg time for inserting track step: 0.054513059687196164s +Avg time for calculating new densities 0.015372603086003085s +Time of simulation: 64.02853393554688s +Execution for Von Neuman expression: 0.001331329345703125s +Number of steps: 912 +Avg time for inserting track step: 0.027901407396584227s +Avg time for calculating new densities 0.018354751823241252s +Time of simulation: 42.46850800514221s +Progress: 6/10 (60.0%) +Execution for Von Neuman expression: 0.0014159679412841797s +Number of steps: 912 +Avg time for inserting track step: 0.011048059975891783s +Avg time for calculating new densities 0.015781759431487637s +Time of simulation: 24.75494360923767s +Execution for Von Neuman expression: 0.0009615421295166016s +Number of steps: 912 +Avg time for inserting track step: 0.06318807288220055s +Avg time for calculating new densities 0.015680352846781414s +Time of simulation: 72.21676397323608s +Execution for Von Neuman expression: 0.0013668537139892578s +Number of steps: 912 +Avg time for inserting track step: 0.03062370733210915s +Avg time for calculating new densities 0.014815188552203932s +Time of simulation: 41.71234083175659s +Execution for Von Neuman expression: 0.0011184215545654297s +Number of steps: 912 +Avg time for inserting track step: 0.012436429920949434s +Avg time for calculating new densities 0.015497565008046334s +Time of simulation: 25.77913761138916s +Execution for Von Neuman expression: 0.0012652873992919922s +Number of steps: 912 +Avg time for inserting track step: 0.0035422436500850475s +Avg time for calculating new densities 0.018346112286835387s +Time of simulation: 20.24303650856018s + +Continuous Beam Comparison: + Energy_MeV dose_rate_air_Gy_s k_s k_s_IonTracks difference relative_error_% + 70 0.823 1.0006 1.001127 0.000527 0.053 + 150 0.762 1.0005 1.000939 0.000439 0.044 + 150 1.866 1.0013 1.002020 0.000720 0.072 + 150 3.665 1.0025 1.003664 0.001164 0.116 + 226 1.122 1.0008 1.001291 0.000491 0.049 + 226 2.877 1.0019 1.002876 0.000976 0.097 + 226 5.610 1.0038 1.005512 0.001712 0.171 + 244 1.207 1.0008 1.001350 0.000550 0.055 + 244 2.978 1.0020 1.003023 0.001023 0.102 + 244 6.103 1.0041 1.006038 0.001938 0.193 + +=== Error Statistics === +Number of successful calculations: 10/10 +Mean absolute error: 0.000954 +Mean relative error: 0.095% +Median relative error: 0.085% +Max relative error: 0.193% +Min relative error: 0.044% +Standard deviation: 0.052% + +====================================================================== +GENERATING PLOTS +====================================================================== +[OK] Saved: initial_recombination_comparison.png +[OK] Saved: continuous_beam_comparison.png +[OK] Saved: relative_error.png + +====================================================================== +SAVING RESULTS +====================================================================== +[OK] Saved: comparison_initial.csv +[OK] Saved: comparison_continuous.csv + NOTE: Calculations used dose_rate_air_Gy_s (not dose_rate_water_Gy_s) +[OK] Saved: comparison_continuous_clean.csv (essential columns only) + +All results saved in: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_007 + +====================================================================== +TESTING COMPLETED +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_008/comparison_continuous.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_008/comparison_continuous.csv new file mode 100644 index 0000000..c55c05d --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_008/comparison_continuous.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_Gy,dose_rate_factor,time_s,dose_rate_water_Gy_s,dose_rate_air_Gy_s,k_s,dose_rate_air_Gy_min,k_s_IonTracks,difference,relative_error_%,absolute_error +150,0.672,1.0,0.004184,4.167,3.665,1.0025,219.9,1.0037777141343183,0.0012777141343183196,0.12745278147813663,0.0012777141343183196 +150,0.672,0.5,0.008216,2.122,1.866,1.0013,111.96000000000001,1.0019894270362786,0.0006894270362785004,0.06885319447503249,0.0006894270362785004 +150,0.672,0.2,0.020117,0.867,0.762,1.0005,45.72,1.0010059211147175,0.000505921114717589,0.050566828057730044,0.000505921114717589 +226,0.673,1.0,0.00277,6.378,5.61,1.0038,336.6,1.0055315490894137,0.001731549089413642,0.17249941117888443,0.001731549089413642 +226,0.673,0.5,0.005401,3.271,2.877,1.0019,172.61999999999998,1.0029401726362372,0.0010401726362372354,0.10382000561305874,0.0010401726362372354 +226,0.673,0.2,0.013849,1.276,1.122,1.0008,67.32000000000001,1.0011990151633674,0.00039901516336748877,0.03986962064023669,0.00039901516336748877 +244,0.676,1.0,0.002562,6.939,6.103,1.0041,366.18,1.006026732145934,0.0019267321459339737,0.19188648002529365,0.0019267321459339737 +244,0.676,0.5,0.00525,3.386,2.978,1.002,178.68,1.003099711850928,0.0010997118509279424,0.10975168172933557,0.0010997118509279424 +244,0.676,0.2,0.012956,1.372,1.207,1.0008,72.42,1.0013041075491238,0.0005041075491238889,0.05037045854555245,0.0005041075491238889 +70,0.825,1.0,0.022265,0.936,0.823,1.0006,49.379999999999995,1.001256331190359,0.0006563311903591273,0.06559376277824579,0.0006563311903591273 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_008/comparison_continuous_clean.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_008/comparison_continuous_clean.csv new file mode 100644 index 0000000..1bc4d55 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_008/comparison_continuous_clean.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_rate_air_Gy_s,k_s,k_s_IonTracks,difference,relative_error_%,absolute_error +150,3.665,1.0025,1.0037777141343183,0.0012777141343183196,0.12745278147813663,0.0012777141343183196 +150,1.866,1.0013,1.0019894270362786,0.0006894270362785004,0.06885319447503249,0.0006894270362785004 +150,0.762,1.0005,1.0010059211147175,0.000505921114717589,0.050566828057730044,0.000505921114717589 +226,5.61,1.0038,1.0055315490894137,0.001731549089413642,0.17249941117888443,0.001731549089413642 +226,2.877,1.0019,1.0029401726362372,0.0010401726362372354,0.10382000561305874,0.0010401726362372354 +226,1.122,1.0008,1.0011990151633674,0.00039901516336748877,0.03986962064023669,0.00039901516336748877 +244,6.103,1.0041,1.006026732145934,0.0019267321459339737,0.19188648002529365,0.0019267321459339737 +244,2.978,1.002,1.003099711850928,0.0010997118509279424,0.10975168172933557,0.0010997118509279424 +244,1.207,1.0008,1.0013041075491238,0.0005041075491238889,0.05037045854555245,0.0005041075491238889 +70,0.823,1.0006,1.001256331190359,0.0006563311903591273,0.06559376277824579,0.0006563311903591273 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_008/comparison_initial.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_008/comparison_initial.csv new file mode 100644 index 0000000..38b36b4 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_008/comparison_initial.csv @@ -0,0 +1,5 @@ +Energy_MeV,k_s_experimental,k_s_IonTracks,difference,relative_error_% +70,1.0006,1.0003619141760138,-0.00023808582398610056,-0.023794305815120986 +150,1.0005,1.0002065945483714,-0.0002934054516285922,-0.02932588222174835 +226,1.0008,1.0001579920055679,-0.0006420079944320367,-0.06414947985931622 +244,1.0008,1.0001507878033964,-0.0006492121966035214,-0.06486932420099135 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_008/continuous_beam_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_008/continuous_beam_comparison.png new file mode 100644 index 0000000..08ace19 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_008/continuous_beam_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_008/initial_recombination_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_008/initial_recombination_comparison.png new file mode 100644 index 0000000..cf58903 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_008/initial_recombination_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_008/relative_error.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_008/relative_error.png new file mode 100644 index 0000000..1344cb8 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_008/relative_error.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_008/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_008/run_log.txt new file mode 100644 index 0000000..9ab87e1 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_008/run_log.txt @@ -0,0 +1,134 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend numba --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_008 +Return code: 0 +Elapsed time: 401.31 seconds + +====================================================================== +STDOUT: +====================================================================== +====================================================================== +TESTING EXPERIMENTAL DATA DCPT 2019 +====================================================================== + +Loaded 10 experimental measurements +Energies: [np.int64(70), np.int64(150), np.int64(226), np.int64(244)] MeV +Voltage: 200 V +Electrode gap: 0.2 cm + +====================================================================== +METHOD 1: INITIAL RECOMBINATION +====================================================================== +Calculating for 70 MeV... +Calculating for 150 MeV... +Calculating for 226 MeV... +Calculating for 244 MeV... + +Initial Recombination Comparison: + Energy_MeV k_s_experimental k_s_IonTracks difference relative_error_% + 70 1.0006 1.000362 -0.000238 -0.023794 + 150 1.0005 1.000207 -0.000293 -0.029326 + 226 1.0008 1.000158 -0.000642 -0.064149 + 244 1.0008 1.000151 -0.000649 -0.064869 + +====================================================================== +METHOD 2: CONTINUOUS BEAM (General Recombination) +====================================================================== +WARNING: This may take several minutes... +Progress: 1/10 (10.0%) +Execution for Von Neuman expression: 0.0009255409240722656s +Number of steps: 912 +Avg time for inserting track step: 0.027987157305081684s +Avg time for calculating new densities 0.015292892853418985s +Time of simulation: 39.75981020927429s +Execution for Von Neuman expression: 0.0012240409851074219s +Number of steps: 912 +Avg time for inserting track step: 0.013792872951741805s +Avg time for calculating new densities 0.016495783600890844s +Time of simulation: 27.901872158050537s +Execution for Von Neuman expression: 0.001506805419921875s +Number of steps: 912 +Avg time for inserting track step: 0.005820680605737786s +Avg time for calculating new densities 0.015490631262461344s +Time of simulation: 19.735562562942505s +Execution for Von Neuman expression: 0.0012097358703613281s +Number of steps: 912 +Avg time for inserting track step: 0.05533366715698911s +Avg time for calculating new densities 0.015208726912214044s +Time of simulation: 64.62326717376709s +Execution for Von Neuman expression: 0.0012142658233642578s +Number of steps: 912 +Avg time for inserting track step: 0.028153998809948302s +Avg time for calculating new densities 0.015213937351578161s +Time of simulation: 39.84437608718872s +Progress: 6/10 (60.0%) +Execution for Von Neuman expression: 0.0012292861938476562s +Number of steps: 912 +Avg time for inserting track step: 0.011154435182872572s +Avg time for calculating new densities 0.015160481657898217s +Time of simulation: 24.289149045944214s +Execution for Von Neuman expression: 0.0014286041259765625s +Number of steps: 912 +Avg time for inserting track step: 0.06251806229875799s +Avg time for calculating new densities 0.014765356454932899s +Time of simulation: 70.7770323753357s +Execution for Von Neuman expression: 0.0012311935424804688s +Number of steps: 912 +Avg time for inserting track step: 0.030909057249102676s +Avg time for calculating new densities 0.015443128713390283s +Time of simulation: 42.568514585494995s +Execution for Von Neuman expression: 0.0012447834014892578s +Number of steps: 912 +Avg time for inserting track step: 0.012299959073986923s +Avg time for calculating new densities 0.01789044967868872s +Time of simulation: 27.842165231704712s +Execution for Von Neuman expression: 0.001299142837524414s +Number of steps: 912 +Avg time for inserting track step: 0.003388438308448122s +Avg time for calculating new densities 0.017746981821562115s +Time of simulation: 19.575659036636353s + +Continuous Beam Comparison: + Energy_MeV dose_rate_air_Gy_s k_s k_s_IonTracks difference relative_error_% + 70 0.823 1.0006 1.001256 0.000656 0.066 + 150 0.762 1.0005 1.001006 0.000506 0.051 + 150 1.866 1.0013 1.001989 0.000689 0.069 + 150 3.665 1.0025 1.003778 0.001278 0.127 + 226 1.122 1.0008 1.001199 0.000399 0.040 + 226 2.877 1.0019 1.002940 0.001040 0.104 + 226 5.610 1.0038 1.005532 0.001732 0.172 + 244 1.207 1.0008 1.001304 0.000504 0.050 + 244 2.978 1.0020 1.003100 0.001100 0.110 + 244 6.103 1.0041 1.006027 0.001927 0.192 + +=== Error Statistics === +Number of successful calculations: 10/10 +Mean absolute error: 0.000983 +Mean relative error: 0.098% +Median relative error: 0.086% +Max relative error: 0.192% +Min relative error: 0.040% +Standard deviation: 0.053% + +====================================================================== +GENERATING PLOTS +====================================================================== +[OK] Saved: initial_recombination_comparison.png +[OK] Saved: continuous_beam_comparison.png +[OK] Saved: relative_error.png + +====================================================================== +SAVING RESULTS +====================================================================== +[OK] Saved: comparison_initial.csv +[OK] Saved: comparison_continuous.csv + NOTE: Calculations used dose_rate_air_Gy_s (not dose_rate_water_Gy_s) +[OK] Saved: comparison_continuous_clean.csv (essential columns only) + +All results saved in: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_008 + +====================================================================== +TESTING COMPLETED +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_009/comparison_continuous.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_009/comparison_continuous.csv new file mode 100644 index 0000000..48d25b4 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_009/comparison_continuous.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_Gy,dose_rate_factor,time_s,dose_rate_water_Gy_s,dose_rate_air_Gy_s,k_s,dose_rate_air_Gy_min,k_s_IonTracks,difference,relative_error_%,absolute_error +150,0.672,1.0,0.004184,4.167,3.665,1.0025,219.9,1.003693996503919,0.0011939965039191591,0.11910189565278397,0.0011939965039191591 +150,0.672,0.5,0.008216,2.122,1.866,1.0013,111.96000000000001,1.0020507372423009,0.0007507372423007919,0.0749762550984512,0.0007507372423007919 +150,0.672,0.2,0.020117,0.867,0.762,1.0005,45.72,1.0009772775311492,0.0004772775311492339,0.04770390116434122,0.0004772775311492339 +226,0.673,1.0,0.00277,6.378,5.61,1.0038,336.6,1.005527389077276,0.001727389077275987,0.17208498478541412,0.001727389077275987 +226,0.673,0.5,0.005401,3.271,2.877,1.0019,172.61999999999998,1.0029069516364042,0.0010069516364041853,0.10050420564968413,0.0010069516364041853 +226,0.673,0.2,0.013849,1.276,1.122,1.0008,67.32000000000001,1.0012661596992092,0.0004661596992092676,0.046578706955362474,0.0004661596992092676 +244,0.676,1.0,0.002562,6.939,6.103,1.0041,366.18,1.0060011537799038,0.0019011537799038525,0.18933908773068941,0.0019011537799038525 +244,0.676,0.5,0.00525,3.386,2.978,1.002,178.68,1.0029687310811446,0.0009687310811445915,0.0966797486172247,0.0009687310811445915 +244,0.676,0.2,0.012956,1.372,1.207,1.0008,72.42,1.0013212765057333,0.0005212765057334146,0.05208598178791113,0.0005212765057334146 +70,0.825,1.0,0.022265,0.936,0.823,1.0006,49.379999999999995,1.0012230950199659,0.0006230950199659357,0.06227213871336556,0.0006230950199659357 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_009/comparison_continuous_clean.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_009/comparison_continuous_clean.csv new file mode 100644 index 0000000..1c9b70c --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_009/comparison_continuous_clean.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_rate_air_Gy_s,k_s,k_s_IonTracks,difference,relative_error_%,absolute_error +150,3.665,1.0025,1.003693996503919,0.0011939965039191591,0.11910189565278397,0.0011939965039191591 +150,1.866,1.0013,1.0020507372423009,0.0007507372423007919,0.0749762550984512,0.0007507372423007919 +150,0.762,1.0005,1.0009772775311492,0.0004772775311492339,0.04770390116434122,0.0004772775311492339 +226,5.61,1.0038,1.005527389077276,0.001727389077275987,0.17208498478541412,0.001727389077275987 +226,2.877,1.0019,1.0029069516364042,0.0010069516364041853,0.10050420564968413,0.0010069516364041853 +226,1.122,1.0008,1.0012661596992092,0.0004661596992092676,0.046578706955362474,0.0004661596992092676 +244,6.103,1.0041,1.0060011537799038,0.0019011537799038525,0.18933908773068941,0.0019011537799038525 +244,2.978,1.002,1.0029687310811446,0.0009687310811445915,0.0966797486172247,0.0009687310811445915 +244,1.207,1.0008,1.0013212765057333,0.0005212765057334146,0.05208598178791113,0.0005212765057334146 +70,0.823,1.0006,1.0012230950199659,0.0006230950199659357,0.06227213871336556,0.0006230950199659357 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_009/comparison_initial.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_009/comparison_initial.csv new file mode 100644 index 0000000..38b36b4 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_009/comparison_initial.csv @@ -0,0 +1,5 @@ +Energy_MeV,k_s_experimental,k_s_IonTracks,difference,relative_error_% +70,1.0006,1.0003619141760138,-0.00023808582398610056,-0.023794305815120986 +150,1.0005,1.0002065945483714,-0.0002934054516285922,-0.02932588222174835 +226,1.0008,1.0001579920055679,-0.0006420079944320367,-0.06414947985931622 +244,1.0008,1.0001507878033964,-0.0006492121966035214,-0.06486932420099135 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_009/continuous_beam_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_009/continuous_beam_comparison.png new file mode 100644 index 0000000..163e76d Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_009/continuous_beam_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_009/initial_recombination_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_009/initial_recombination_comparison.png new file mode 100644 index 0000000..cf58903 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_009/initial_recombination_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_009/relative_error.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_009/relative_error.png new file mode 100644 index 0000000..7b417ac Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_009/relative_error.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_009/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_009/run_log.txt new file mode 100644 index 0000000..7998e1b --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_009/run_log.txt @@ -0,0 +1,134 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend numba --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_009 +Return code: 0 +Elapsed time: 402.06 seconds + +====================================================================== +STDOUT: +====================================================================== +====================================================================== +TESTING EXPERIMENTAL DATA DCPT 2019 +====================================================================== + +Loaded 10 experimental measurements +Energies: [np.int64(70), np.int64(150), np.int64(226), np.int64(244)] MeV +Voltage: 200 V +Electrode gap: 0.2 cm + +====================================================================== +METHOD 1: INITIAL RECOMBINATION +====================================================================== +Calculating for 70 MeV... +Calculating for 150 MeV... +Calculating for 226 MeV... +Calculating for 244 MeV... + +Initial Recombination Comparison: + Energy_MeV k_s_experimental k_s_IonTracks difference relative_error_% + 70 1.0006 1.000362 -0.000238 -0.023794 + 150 1.0005 1.000207 -0.000293 -0.029326 + 226 1.0008 1.000158 -0.000642 -0.064149 + 244 1.0008 1.000151 -0.000649 -0.064869 + +====================================================================== +METHOD 2: CONTINUOUS BEAM (General Recombination) +====================================================================== +WARNING: This may take several minutes... +Progress: 1/10 (10.0%) +Execution for Von Neuman expression: 0.0008671283721923828s +Number of steps: 912 +Avg time for inserting track step: 0.028483231339538305s +Avg time for calculating new densities 0.017101845720358062s +Time of simulation: 41.8624210357666s +Execution for Von Neuman expression: 0.0021300315856933594s +Number of steps: 912 +Avg time for inserting track step: 0.013791451590103015s +Avg time for calculating new densities 0.01653653513966945s +Time of simulation: 28.070038557052612s +Execution for Von Neuman expression: 0.0008993148803710938s +Number of steps: 912 +Avg time for inserting track step: 0.005748252596771508s +Avg time for calculating new densities 0.015243344662482278s +Time of simulation: 19.437278985977173s +Execution for Von Neuman expression: 0.0012443065643310547s +Number of steps: 912 +Avg time for inserting track step: 0.054822088333598355s +Avg time for calculating new densities 0.01510338354528996s +Time of simulation: 64.05797863006592s +Execution for Von Neuman expression: 0.0012755393981933594s +Number of steps: 912 +Avg time for inserting track step: 0.02792082857667354s +Avg time for calculating new densities 0.015428269902865091s +Time of simulation: 39.826194524765015s +Progress: 6/10 (60.0%) +Execution for Von Neuman expression: 0.0013337135314941406s +Number of steps: 912 +Avg time for inserting track step: 0.0110356352831188s +Avg time for calculating new densities 0.01505976026518303s +Time of simulation: 24.081625938415527s +Execution for Von Neuman expression: 0.0016481876373291016s +Number of steps: 912 +Avg time for inserting track step: 0.06198434087268093s +Avg time for calculating new densities 0.015134841987961218s +Time of simulation: 70.62524366378784s +Execution for Von Neuman expression: 0.0013277530670166016s +Number of steps: 912 +Avg time for inserting track step: 0.030678739673212954s +Avg time for calculating new densities 0.016630368013130992s +Time of simulation: 43.43561410903931s +Execution for Von Neuman expression: 0.001354217529296875s +Number of steps: 912 +Avg time for inserting track step: 0.01240694104579457s +Avg time for calculating new densities 0.015657957708626463s +Time of simulation: 25.893929481506348s +Execution for Von Neuman expression: 0.0013649463653564453s +Number of steps: 912 +Avg time for inserting track step: 0.003574079327416002s +Avg time for calculating new densities 0.018710542666284663s +Time of simulation: 20.63742709159851s + +Continuous Beam Comparison: + Energy_MeV dose_rate_air_Gy_s k_s k_s_IonTracks difference relative_error_% + 70 0.823 1.0006 1.001223 0.000623 0.062 + 150 0.762 1.0005 1.000977 0.000477 0.048 + 150 1.866 1.0013 1.002051 0.000751 0.075 + 150 3.665 1.0025 1.003694 0.001194 0.119 + 226 1.122 1.0008 1.001266 0.000466 0.047 + 226 2.877 1.0019 1.002907 0.001007 0.101 + 226 5.610 1.0038 1.005527 0.001727 0.172 + 244 1.207 1.0008 1.001321 0.000521 0.052 + 244 2.978 1.0020 1.002969 0.000969 0.097 + 244 6.103 1.0041 1.006001 0.001901 0.189 + +=== Error Statistics === +Number of successful calculations: 10/10 +Mean absolute error: 0.000964 +Mean relative error: 0.096% +Median relative error: 0.086% +Max relative error: 0.189% +Min relative error: 0.047% +Standard deviation: 0.051% + +====================================================================== +GENERATING PLOTS +====================================================================== +[OK] Saved: initial_recombination_comparison.png +[OK] Saved: continuous_beam_comparison.png +[OK] Saved: relative_error.png + +====================================================================== +SAVING RESULTS +====================================================================== +[OK] Saved: comparison_initial.csv +[OK] Saved: comparison_continuous.csv + NOTE: Calculations used dose_rate_air_Gy_s (not dose_rate_water_Gy_s) +[OK] Saved: comparison_continuous_clean.csv (essential columns only) + +All results saved in: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_009 + +====================================================================== +TESTING COMPLETED +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_010/comparison_continuous.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_010/comparison_continuous.csv new file mode 100644 index 0000000..709a1f7 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_010/comparison_continuous.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_Gy,dose_rate_factor,time_s,dose_rate_water_Gy_s,dose_rate_air_Gy_s,k_s,dose_rate_air_Gy_min,k_s_IonTracks,difference,relative_error_%,absolute_error +150,0.672,1.0,0.004184,4.167,3.665,1.0025,219.9,1.0040402694436117,0.0015402694436117415,0.15364283726800415,0.0015402694436117415 +150,0.672,0.5,0.008216,2.122,1.866,1.0013,111.96000000000001,1.002159206870455,0.0008592068704549316,0.08580913516977245,0.0008592068704549316 +150,0.672,0.2,0.020117,0.867,0.762,1.0005,45.72,1.0009255500757088,0.00042555007570888037,0.04253374070053777,0.00042555007570888037 +226,0.673,1.0,0.00277,6.378,5.61,1.0038,336.6,1.005675263711261,0.0018752637112608994,0.1868164685456166,0.0018752637112608994 +226,0.673,0.5,0.005401,3.271,2.877,1.0019,172.61999999999998,1.0031228664663312,0.001222866466331185,0.12205474262213643,0.001222866466331185 +226,0.673,0.2,0.013849,1.276,1.122,1.0008,67.32000000000001,1.001292076977152,0.0004920769771521449,0.04916836302479466,0.0004920769771521449 +244,0.676,1.0,0.002562,6.939,6.103,1.0041,366.18,1.0060397819468783,0.0019397819468782718,0.1931861315484784,0.0019397819468782718 +244,0.676,0.5,0.00525,3.386,2.978,1.002,178.68,1.0031551597453947,0.0011551597453947071,0.1152854037320067,0.0011551597453947071 +244,0.676,0.2,0.012956,1.372,1.207,1.0008,72.42,1.0013917836082307,0.0005917836082307559,0.05913105597829296,0.0005917836082307559 +70,0.825,1.0,0.022265,0.936,0.823,1.0006,49.379999999999995,1.001303878400376,0.0007038784003761123,0.07034563265801642,0.0007038784003761123 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_010/comparison_continuous_clean.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_010/comparison_continuous_clean.csv new file mode 100644 index 0000000..2865ee8 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_010/comparison_continuous_clean.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_rate_air_Gy_s,k_s,k_s_IonTracks,difference,relative_error_%,absolute_error +150,3.665,1.0025,1.0040402694436117,0.0015402694436117415,0.15364283726800415,0.0015402694436117415 +150,1.866,1.0013,1.002159206870455,0.0008592068704549316,0.08580913516977245,0.0008592068704549316 +150,0.762,1.0005,1.0009255500757088,0.00042555007570888037,0.04253374070053777,0.00042555007570888037 +226,5.61,1.0038,1.005675263711261,0.0018752637112608994,0.1868164685456166,0.0018752637112608994 +226,2.877,1.0019,1.0031228664663312,0.001222866466331185,0.12205474262213643,0.001222866466331185 +226,1.122,1.0008,1.001292076977152,0.0004920769771521449,0.04916836302479466,0.0004920769771521449 +244,6.103,1.0041,1.0060397819468783,0.0019397819468782718,0.1931861315484784,0.0019397819468782718 +244,2.978,1.002,1.0031551597453947,0.0011551597453947071,0.1152854037320067,0.0011551597453947071 +244,1.207,1.0008,1.0013917836082307,0.0005917836082307559,0.05913105597829296,0.0005917836082307559 +70,0.823,1.0006,1.001303878400376,0.0007038784003761123,0.07034563265801642,0.0007038784003761123 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_010/comparison_initial.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_010/comparison_initial.csv new file mode 100644 index 0000000..38b36b4 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_010/comparison_initial.csv @@ -0,0 +1,5 @@ +Energy_MeV,k_s_experimental,k_s_IonTracks,difference,relative_error_% +70,1.0006,1.0003619141760138,-0.00023808582398610056,-0.023794305815120986 +150,1.0005,1.0002065945483714,-0.0002934054516285922,-0.02932588222174835 +226,1.0008,1.0001579920055679,-0.0006420079944320367,-0.06414947985931622 +244,1.0008,1.0001507878033964,-0.0006492121966035214,-0.06486932420099135 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_010/continuous_beam_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_010/continuous_beam_comparison.png new file mode 100644 index 0000000..e1d48d0 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_010/continuous_beam_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_010/initial_recombination_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_010/initial_recombination_comparison.png new file mode 100644 index 0000000..cf58903 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_010/initial_recombination_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_010/relative_error.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_010/relative_error.png new file mode 100644 index 0000000..c8a0c33 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_010/relative_error.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_010/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_010/run_log.txt new file mode 100644 index 0000000..78b766e --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/numba/run_010/run_log.txt @@ -0,0 +1,134 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend numba --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_010 +Return code: 0 +Elapsed time: 394.73 seconds + +====================================================================== +STDOUT: +====================================================================== +====================================================================== +TESTING EXPERIMENTAL DATA DCPT 2019 +====================================================================== + +Loaded 10 experimental measurements +Energies: [np.int64(70), np.int64(150), np.int64(226), np.int64(244)] MeV +Voltage: 200 V +Electrode gap: 0.2 cm + +====================================================================== +METHOD 1: INITIAL RECOMBINATION +====================================================================== +Calculating for 70 MeV... +Calculating for 150 MeV... +Calculating for 226 MeV... +Calculating for 244 MeV... + +Initial Recombination Comparison: + Energy_MeV k_s_experimental k_s_IonTracks difference relative_error_% + 70 1.0006 1.000362 -0.000238 -0.023794 + 150 1.0005 1.000207 -0.000293 -0.029326 + 226 1.0008 1.000158 -0.000642 -0.064149 + 244 1.0008 1.000151 -0.000649 -0.064869 + +====================================================================== +METHOD 2: CONTINUOUS BEAM (General Recombination) +====================================================================== +WARNING: This may take several minutes... +Progress: 1/10 (10.0%) +Execution for Von Neuman expression: 0.002255678176879883s +Number of steps: 912 +Avg time for inserting track step: 0.027669705581246762s +Avg time for calculating new densities 0.014835669806129053s +Time of simulation: 39.09836173057556s +Execution for Von Neuman expression: 0.0012981891632080078s +Number of steps: 912 +Avg time for inserting track step: 0.013928442409164027s +Avg time for calculating new densities 0.016257117714798243s +Time of simulation: 27.816680431365967s +Execution for Von Neuman expression: 0.0013124942779541016s +Number of steps: 912 +Avg time for inserting track step: 0.00554784661845157s +Avg time for calculating new densities 0.014626189543489824s +Time of simulation: 18.674075603485107s +Execution for Von Neuman expression: 0.001199960708618164s +Number of steps: 912 +Avg time for inserting track step: 0.054476621642447355s +Avg time for calculating new densities 0.017702799355774596s +Time of simulation: 66.1080367565155s +Execution for Von Neuman expression: 0.0014727115631103516s +Number of steps: 912 +Avg time for inserting track step: 0.027869689882847302s +Avg time for calculating new densities 0.015013189430822405s +Time of simulation: 39.40018010139465s +Progress: 6/10 (60.0%) +Execution for Von Neuman expression: 0.0012273788452148438s +Number of steps: 912 +Avg time for inserting track step: 0.010962431890922681s +Avg time for calculating new densities 0.016377861039680346s +Time of simulation: 25.2181453704834s +Execution for Von Neuman expression: 0.0013377666473388672s +Number of steps: 912 +Avg time for inserting track step: 0.06192396319749063s +Avg time for calculating new densities 0.015142850185695448s +Time of simulation: 70.58415532112122s +Execution for Von Neuman expression: 0.0012309551239013672s +Number of steps: 912 +Avg time for inserting track step: 0.030186629086210018s +Avg time for calculating new densities 0.014733969642404924s +Time of simulation: 41.25172257423401s +Execution for Von Neuman expression: 0.0012385845184326172s +Number of steps: 912 +Avg time for inserting track step: 0.012341986622726708s +Avg time for calculating new densities 0.015215331525133368s +Time of simulation: 25.44965386390686s +Execution for Von Neuman expression: 0.000965118408203125s +Number of steps: 912 +Avg time for inserting track step: 0.0034457032094921984s +Avg time for calculating new densities 0.014821278682926245s +Time of simulation: 16.948774814605713s + +Continuous Beam Comparison: + Energy_MeV dose_rate_air_Gy_s k_s k_s_IonTracks difference relative_error_% + 70 0.823 1.0006 1.001304 0.000704 0.070 + 150 0.762 1.0005 1.000926 0.000426 0.043 + 150 1.866 1.0013 1.002159 0.000859 0.086 + 150 3.665 1.0025 1.004040 0.001540 0.154 + 226 1.122 1.0008 1.001292 0.000492 0.049 + 226 2.877 1.0019 1.003123 0.001223 0.122 + 226 5.610 1.0038 1.005675 0.001875 0.187 + 244 1.207 1.0008 1.001392 0.000592 0.059 + 244 2.978 1.0020 1.003155 0.001155 0.115 + 244 6.103 1.0041 1.006040 0.001940 0.193 + +=== Error Statistics === +Number of successful calculations: 10/10 +Mean absolute error: 0.001081 +Mean relative error: 0.108% +Median relative error: 0.101% +Max relative error: 0.193% +Min relative error: 0.043% +Standard deviation: 0.056% + +====================================================================== +GENERATING PLOTS +====================================================================== +[OK] Saved: initial_recombination_comparison.png +[OK] Saved: continuous_beam_comparison.png +[OK] Saved: relative_error.png + +====================================================================== +SAVING RESULTS +====================================================================== +[OK] Saved: comparison_initial.csv +[OK] Saved: comparison_continuous.csv + NOTE: Calculations used dose_rate_air_Gy_s (not dose_rate_water_Gy_s) +[OK] Saved: comparison_continuous_clean.csv (essential columns only) + +All results saved in: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_010 + +====================================================================== +TESTING COMPLETED +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/plots/error_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/plots/error_comparison.png new file mode 100644 index 0000000..99e692f Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/plots/error_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/plots/execution_time_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/plots/execution_time_comparison.png new file mode 100644 index 0000000..1c277fd Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/plots/execution_time_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/plots/execution_time_runs.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/plots/execution_time_runs.png new file mode 100644 index 0000000..1f89e10 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/plots/execution_time_runs.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/plots/speedup_comparison.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/plots/speedup_comparison.png new file mode 100644 index 0000000..aa19c7d Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/plots/speedup_comparison.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/plots/summary_statistics.png b/backend-performance-benchmark/2019_DCPT/benchmark_results/plots/summary_statistics.png new file mode 100644 index 0000000..296f6b0 Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/benchmark_results/plots/summary_statistics.png differ diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_001/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_001/run_log.txt new file mode 100644 index 0000000..583757b --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_001/run_log.txt @@ -0,0 +1,13 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend python --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\python\run_001 +Return code: 1 +Elapsed time: 2395.42 seconds +Timeout limit: 2395.40 seconds +TIMEOUT: Exceeded efficiency requirement (2x max(cython, numba)) + +====================================================================== +STDOUT: +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_002/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_002/run_log.txt new file mode 100644 index 0000000..a4676f0 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_002/run_log.txt @@ -0,0 +1,13 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend python --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\python\run_002 +Return code: 1 +Elapsed time: 2312.14 seconds +Timeout limit: 2312.12 seconds +TIMEOUT: Exceeded efficiency requirement (2x max(cython, numba)) + +====================================================================== +STDOUT: +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_003/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_003/run_log.txt new file mode 100644 index 0000000..1782450 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_003/run_log.txt @@ -0,0 +1,13 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend python --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\python\run_003 +Return code: 1 +Elapsed time: 2356.65 seconds +Timeout limit: 2356.62 seconds +TIMEOUT: Exceeded efficiency requirement (2x max(cython, numba)) + +====================================================================== +STDOUT: +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_004/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_004/run_log.txt new file mode 100644 index 0000000..bf224c0 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_004/run_log.txt @@ -0,0 +1,13 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend python --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\python\run_004 +Return code: 1 +Elapsed time: 2346.99 seconds +Timeout limit: 2346.95 seconds +TIMEOUT: Exceeded efficiency requirement (2x max(cython, numba)) + +====================================================================== +STDOUT: +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_005/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_005/run_log.txt new file mode 100644 index 0000000..a0b632d --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_005/run_log.txt @@ -0,0 +1,13 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend python --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\python\run_005 +Return code: 1 +Elapsed time: 2349.91 seconds +Timeout limit: 2349.89 seconds +TIMEOUT: Exceeded efficiency requirement (2x max(cython, numba)) + +====================================================================== +STDOUT: +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_006/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_006/run_log.txt new file mode 100644 index 0000000..d102366 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_006/run_log.txt @@ -0,0 +1,13 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend python --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\python\run_006 +Return code: 1 +Elapsed time: 2285.16 seconds +Timeout limit: 2285.14 seconds +TIMEOUT: Exceeded efficiency requirement (2x max(cython, numba)) + +====================================================================== +STDOUT: +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_007/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_007/run_log.txt new file mode 100644 index 0000000..f9407ec --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_007/run_log.txt @@ -0,0 +1,13 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend python --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\python\run_007 +Return code: 1 +Elapsed time: 47830.96 seconds +Timeout limit: 2244.34 seconds +TIMEOUT: Exceeded efficiency requirement (2x max(cython, numba)) + +====================================================================== +STDOUT: +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_008/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_008/run_log.txt new file mode 100644 index 0000000..aeafc4a --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_008/run_log.txt @@ -0,0 +1,13 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend python --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\python\run_008 +Return code: 1 +Elapsed time: 2416.62 seconds +Timeout limit: 2416.58 seconds +TIMEOUT: Exceeded efficiency requirement (2x max(cython, numba)) + +====================================================================== +STDOUT: +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_009/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_009/run_log.txt new file mode 100644 index 0000000..0b75bbd --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_009/run_log.txt @@ -0,0 +1,13 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend python --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\python\run_009 +Return code: 1 +Elapsed time: 3054.94 seconds +Timeout limit: 2211.85 seconds +TIMEOUT: Exceeded efficiency requirement (2x max(cython, numba)) + +====================================================================== +STDOUT: +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_010/run_log.txt b/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_010/run_log.txt new file mode 100644 index 0000000..e1c4ed4 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/python/run_010/run_log.txt @@ -0,0 +1,13 @@ +Command: C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\venv\Scripts\python.exe -u C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\test_experimental_data.py --backend python --output-dir C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\python\run_010 +Return code: 1 +Elapsed time: 2187.95 seconds +Timeout limit: 2187.93 seconds +TIMEOUT: Exceeded efficiency requirement (2x max(cython, numba)) + +====================================================================== +STDOUT: +====================================================================== + +====================================================================== +STDERR: +====================================================================== diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/statistics_summary_20251210_003508.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/statistics_summary_20251210_003508.csv new file mode 100644 index 0000000..514246c --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/statistics_summary_20251210_003508.csv @@ -0,0 +1,4 @@ +backend,total_runs,successful_runs,efficiency_failed_runs,failed_runs,error_runs,mean_time_seconds,std_time_seconds,min_time_seconds,max_time_seconds,mean_continuous_error_%,std_continuous_error_%,mean_initial_error_%,efficiency_failed_mean_time,efficiency_failed_max_time +cython,10,10,0,0,0,1155.3415449142456,38.45861012040056,1093.9640791416168,1208.2883522510529,0.059974886833256726,0.0029803106364291797,-0.04553474802429418,, +numba,10,10,0,0,0,404.5843306541443,7.802322609502669,394.73216104507446,420.40017437934875,0.09935058912596127,0.0043338454519572635,-0.04553474802429418,, +python,10,0,10,0,0,,,,,,,,6953.673915910721,47830.958733558655 diff --git a/backend-performance-benchmark/2019_DCPT/benchmark_results/summary_all_runs_20251210_003508.csv b/backend-performance-benchmark/2019_DCPT/benchmark_results/summary_all_runs_20251210_003508.csv new file mode 100644 index 0000000..976be29 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/benchmark_results/summary_all_runs_20251210_003508.csv @@ -0,0 +1,31 @@ +backend,run_number,status,elapsed_time_seconds,return_code,output_dir,initial_mean_error_%,initial_max_error_%,initial_min_error_%,continuous_mean_error_%,continuous_median_error_%,continuous_max_error_%,continuous_min_error_%,continuous_std_error_%,continuous_successful_calculations,timeout_limit,efficiency_requirement_failed +cython,1,success,1197.7002890110016,0,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_001,-0.04553474802429418,-0.0237943058151209,-0.0648693242009913,0.05945397801091521,0.0527679904006245,0.1145448029229622,0.0304999019274134,0.02875018518656369,10.0,, +cython,2,success,1156.0624191761017,0,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_002,-0.04553474802429418,-0.0237943058151209,-0.0648693242009913,0.06007537484482026,0.05356295028738055,0.1211017253024684,0.0252751572820933,0.03226601379773323,10.0,, +cython,3,success,1178.311782360077,0,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_003,-0.04553474802429418,-0.0237943058151209,-0.0648693242009913,0.06377353364331848,0.0614150254950497,0.1135649302059632,0.0339439150082851,0.025977798807533516,10.0,, +cython,4,success,1173.477355003357,0,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_004,-0.04553474802429418,-0.0237943058151209,-0.0648693242009913,0.05776950968949897,0.05050212391810655,0.120850257796309,0.0265536889655616,0.03283022108842214,10.0,, +cython,5,success,1174.9468173980713,0,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_005,-0.04553474802429418,-0.0237943058151209,-0.0648693242009913,0.05811355857773905,0.052063379086977654,0.1037882634216487,0.0259369005608831,0.028604775486891443,10.0,, +cython,6,success,1142.5675656795502,0,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_006,-0.04553474802429418,-0.0237943058151209,-0.0648693242009913,0.06175801205738577,0.05553935350494465,0.113561021185217,0.0339815755540757,0.02824126288708307,10.0,, +cython,7,success,1122.1697385311127,0,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_007,-0.04553474802429418,-0.0237943058151209,-0.0648693242009913,0.06181014714329434,0.05531247558031585,0.1142461750222786,0.0311430027357201,0.02652325673096833,10.0,, +cython,8,success,1208.2883522510529,0,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_008,-0.04553474802429418,-0.0237943058151209,-0.0648693242009913,0.053837343250797844,0.0484157497954458,0.1068216671377799,0.0228383812169473,0.027689699715575288,10.0,, +cython,9,success,1105.9270505905151,0,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_009,-0.04553474802429418,-0.0237943058151209,-0.0648693242009913,0.05963715404387372,0.05322282632492405,0.098146338426557,0.0348999926751845,0.022342664034743862,10.0,, +cython,10,success,1093.9640791416168,0,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\cython\run_010,-0.04553474802429418,-0.0237943058151209,-0.0648693242009913,0.06352025707092356,0.0579430102711954,0.1198676254096691,0.0306183100128793,0.029707185763719123,10.0,, +numba,1,success,399.7500989437103,0,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_001,-0.04553474802429418,-0.0237943058151209,-0.0648693242009913,0.09547358079129385,0.08589548971506195,0.1837352860814836,0.0380148299586173,0.05110987088311711,10.0,, +numba,2,success,396.28468799591064,0,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_002,-0.04553474802429418,-0.0237943058151209,-0.0648693242009913,0.10510547148978122,0.09540049253505714,0.1961666105463439,0.0514959037897534,0.05168848183481676,10.0,, +numba,3,success,408.42821288108826,0,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_003,-0.04553474802429418,-0.0237943058151209,-0.0648693242009913,0.09945497798304725,0.0889506053501595,0.1780854534608588,0.0540230037481404,0.043504704645943075,10.0,, +numba,4,success,420.40017437934875,0,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_004,-0.04553474802429418,-0.0237943058151209,-0.0648693242009913,0.09557088735755265,0.08697640362550235,0.1855629007602074,0.0414438714254496,0.05341147800173958,10.0,, +numba,5,success,413.3276538848877,0,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_005,-0.04553474802429418,-0.0237943058151209,-0.0648693242009913,0.09900957544195196,0.0955336417587738,0.1837314911318908,0.0441754123940367,0.05060041292348426,10.0,, +numba,6,success,404.6671850681305,0,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_006,-0.04553474802429418,-0.0237943058151209,-0.0648693242009913,0.10172570950834951,0.09116953515581824,0.2008424674453296,0.0444543831633116,0.05493859347065226,10.0,, +numba,7,success,404.885370016098,0,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_007,-0.04553474802429418,-0.0237943058151209,-0.0648693242009913,0.09516922449519737,0.0846388363080606,0.1930179723252969,0.0438589781265821,0.05213069879906796,10.0,, +numba,8,success,401.3081924915314,0,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_008,-0.04553474802429418,-0.0237943058151209,-0.0648693242009913,0.0980664224521506,0.08633660004404554,0.1918864800252936,0.0398696206402366,0.052916654184859566,10.0,, +numba,9,success,402.05956983566284,0,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_009,-0.04553474802429418,-0.0237943058151209,-0.0648693242009913,0.09613269061552275,0.08582800185783795,0.1893390877306894,0.0465787069553624,0.05092299905064086,10.0,, +numba,10,success,394.73216104507446,0,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\numba\run_010,-0.04553474802429418,-0.0237943058151209,-0.0648693242009913,0.1077973511247656,0.10054726945088954,0.1931861315484784,0.0425337407005377,0.05562536962733506,10.0,, +python,1,efficiency_failed,2395.4203407764435,1,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\python\run_001,,,,,,,,,,2395.400578022003,True +python,2,efficiency_failed,2312.1418306827545,1,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\python\run_002,,,,,,,,,,2312.1248383522034,True +python,3,efficiency_failed,2356.650502681732,1,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\python\run_003,,,,,,,,,,2356.623564720154,True +python,4,efficiency_failed,2346.987823009491,1,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\python\run_004,,,,,,,,,,2346.954710006714,True +python,5,efficiency_failed,2349.9122116565704,1,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\python\run_005,,,,,,,,,,2349.8936347961426,True +python,6,efficiency_failed,2285.1603100299835,1,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\python\run_006,,,,,,,,,,2285.1351313591003,True +python,7,efficiency_failed,47830.958733558655,1,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\python\run_007,,,,,,,,,,2244.3394770622253,True +python,8,efficiency_failed,2416.6174647808075,1,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\python\run_008,,,,,,,,,,2416.5767045021057,True +python,9,efficiency_failed,3054.9412684440613,1,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\python\run_009,,,,,,,,,,2211.8541011810303,True +python,10,efficiency_failed,2187.9486734867096,1,C:\Users\Jakub Kalinski\Documents\GitHub\IonTracks-Cython\experimental-data\2019_DCPT\benchmark_results\python\run_010,,,,,,,,,,2187.9281582832336,True diff --git a/backend-performance-benchmark/2019_DCPT/experimental-data-200V/README.md b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/README.md new file mode 100644 index 0000000..dd170e5 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/README.md @@ -0,0 +1,25 @@ +# experimental-data +Contains ion recombination measurements for validations. + +## Data Structure + +### 2019_DCPT + +Data acquired in 2019 at the Danish Center for Particle Therapy (DCPT) using: + +- Advanced Markus chamber (parallel-plate), 2 mm electrode gap +- Proton energies: 70, 150, 226, 244 MeV +- Voltages: 50, 67, 83, 125, 200 V (chosen to look reasonable on a 1/V plot) +- Various dose rates (dependent on beam energy and degrader settings) + +Publication: [IOP article](https://iopscience.iop.org/article/10.1088/1361-6560/ab8579/meta) + +The recombination, calculated for 200 V, is stored in `2019_DCPT/recombination_200V_data.csv` with columns: + +- `Energy_MeV`: proton kinetic energy in MeV +- `dose_Gy`: delivered dose in Gy +- `dose_rate_factor`: relative scaling factor for dose rate (not important) +- `time_s`: irradiation time (not important) +- `dose_rate_water_Gy_s`: dose rate in water in Gy/s +- `dose_rate_air_Gy_s`: dose rate in air in Gy/s +- `k_s`: recombination correction factor at 200 V diff --git a/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/150MeV/0.2.dat b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/150MeV/0.2.dat new file mode 100644 index 0000000..b657bce --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/150MeV/0.2.dat @@ -0,0 +1,8 @@ +# OBS: Varian time is approx 3 mins off +# DRF, T [C], P [kPa], voltage [V], charge [nC], charge [nC], charge [nC], time [hr:min] +# ----------------------------------------------------- +0.2, 22.0, 101.01, 50, 7.929, 7.928, 7.928, 14.16 +0.2, 22.0, 101.01, 67, 7.956, 7.955, 7.956, 14.23 +0.2, 22.0, 101.01, 83, 7.968, 7.968, 7.967, 14.55 +0.2, 22.0, 101.01, 125, 7.985, 7.985, 7.986, 14.29 +0.2, 22.0, 101.01, 200, 7.994, 7.995, 7.996, 14.32 diff --git a/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/150MeV/0.5.dat b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/150MeV/0.5.dat new file mode 100644 index 0000000..9c7d4e6 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/150MeV/0.5.dat @@ -0,0 +1,8 @@ +# OBS: Varian time is approx 3 mins off +# DRF, T [C], P [kPa], voltage [V], charge [nC], charge [nC], charge [nC], time [hr:min] +# ----------------------------------------------------- +0.5, 22.0, 101.01, 50, 7.838, 7.841, 7.839, 15.05 +0.5, 22.0, 101.01, 67, 7.903, 7.906, 7.903, 15.01 +0.5, 22.0, 101.01, 83, 7.941, 7.939, 7.937, 14.46 +0.5, 22.0, 101.01, 125, 7.966, 7.970, 7.984, 14.41 # OBS: 7.984 might be wrong (DRF?) +0.5, 22.0, 101.01, 200, 7.990, 7.986, 7.986, 14.38 diff --git a/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/150MeV/1.0.dat b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/150MeV/1.0.dat new file mode 100644 index 0000000..5f68e17 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/150MeV/1.0.dat @@ -0,0 +1,8 @@ +# OBS: Varian time is approx 3 mins off +# DRF, T [C], P [kPa], voltage [V], charge [nC], charge [nC], charge [nC], time [hr:min] +# ----------------------------------------------------- +1.0, 22.0, 101.01, 50, 7.715, 7.718, 7.719, 15.08 +1.0, 22.0, 101.01, 67, 7.839, 7.833, 7.839, 15.11 +1.0, 22.0, 101.01, 83, 7.889, 7.890, 7.890, 15.14 +1.0, 22.0, 101.01, 125, 7.959, 7.950, 7.951, 15.17 +1.0, 22.0, 101.01, 200, 7.983, 7.984, 7.988, 15.20 diff --git a/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/226MeV/0.2.dat b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/226MeV/0.2.dat new file mode 100644 index 0000000..90cced3 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/226MeV/0.2.dat @@ -0,0 +1,8 @@ +# OBS: Varian time is approx 3 mins off +# DRF, T [C], P [kPa], voltage [V], charge [nC], charge [nC], charge [nC], time [hr:min] +# ----------------------------------------------------- +0.2, 22.1, 99.89, 50, 7.826, 7.820, 7.816, 15.xx? +0.2, 22.1, 99.89, 67, 7.872, 7.872, 7.869, 15.xx? +0.2, 22.1, 99.89, 83, 7.890, 7.892, 7.894, 14.5x? +0.2, 22.1, 99.89, 125, 7.916, 7.918, 7.917, 14.5x? +0.2, 22.1, 99.89, 200, 7.937, 7.935, 7.939, 14.45 diff --git a/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/226MeV/0.5.dat b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/226MeV/0.5.dat new file mode 100644 index 0000000..1ccd6f1 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/226MeV/0.5.dat @@ -0,0 +1,10 @@ +# OBS: Varian time is approx 3 mins off +# DRF, T [C], P [kPa], voltage [V], charge [nC], charge [nC], charge [nC], time [hr:min] +# ----------------------------------------------------- +0.5, 22.1, 99.89, 50, 7.655, 7.658, 7.656, 14.34 +0.5, 22.1, 99.89, 67, 7.783, 7.791, 7.783, 14.34 +0.5, 22.1, 99.89, 83, 7.830, 7.837, 7.837, 14.34 +0.5, 22.1, 99.89, 125, 7.899, 7.903, 7.903, 14.44 +0.5, 22.1, 99.89, 200, 7.933, 7.929, 7.955, 14.44 + + diff --git a/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/226MeV/1.0.dat b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/226MeV/1.0.dat new file mode 100644 index 0000000..e010b3b --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/226MeV/1.0.dat @@ -0,0 +1,9 @@ +# OBS: Varian time is approx 3 mins off +# DRF, T [C], P [kPa], voltage [V], charge [nC], charge [nC], charge [nC], time [hr:min] +# ----------------------------------------------------- +1.0, 22.1, 99.89, 50, 7.426, 7.418, 7.432, 13.xx +1.0, 22.1, 99.89, 67, 7.630, 7.637, 7.633, 13.xx +1.0, 22.1, 99.89, 83, 7.752, 7.756, 7.752, 13.xx? +1.0, 22.1, 99.89, 125, 7.859, 7.855, 7.859, 12.xx? +1.0, 22.1, 99.89, 200, 7.923, 7.915, , 12.46 # we only measured twice here... + diff --git a/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/244MeV/0.2.dat b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/244MeV/0.2.dat new file mode 100644 index 0000000..db7d71c --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/244MeV/0.2.dat @@ -0,0 +1,8 @@ +# OBS: Varian time is approx 3 mins off +# DRF, T [C], P [kPa], voltage [V], charge [nC], charge [nC], charge [nC], time [hr:min] +# ----------------------------------------------------- +0.2, 22.0, 101.01, 50, 7.886, 7.899, 7.899, 14.08 +0.2, 22.0, 101.01, 67, 7.960, 7.959, 7.955, 14.00 +0.2, 22.0, 101.01, 83, 7.982, 7.979, 7.986, 13.55 +0.2, 22.0, 101.01, 125, 8.021, 8.018, 8.022, 13.38 +0.2, 22.0, 101.01, 200, 8.040, 8.044, 8.039, 13.32 diff --git a/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/244MeV/0.5.dat b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/244MeV/0.5.dat new file mode 100644 index 0000000..56d2ddd --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/244MeV/0.5.dat @@ -0,0 +1,9 @@ +# OBS: Varian time is approx 3 mins off +# DRF, T [C], P [kPa], voltage [V], charge [nC], charge [nC], charge [nC], time [hr:min] +# ----------------------------------------------------- +0.5, 22.1, 99.96, 50, 7.655, 7.660, 7.665, 16.05 +0.5, 22.1, 99.96, 67, 7.808, 7.794, 7.806, 15.xx +0.5, 22.1, 99.96, 83, 7.867, 7.869, 7.874, 15.56 +0.5, 22.1, 99.96, 125, 7.937, 7.945, 7.939, 15.53 +0.5, 22.1, 99.96, 200, 7.974, 7.974, 7.962, 15.50 + diff --git a/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/244MeV/1.0.csv b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/244MeV/1.0.csv new file mode 100644 index 0000000..989d1a1 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/244MeV/1.0.csv @@ -0,0 +1,51 @@ +doserate_factor,T_C,P_kPa,voltage_V,charge_run1_nC,charge_run2_nC,charge_run3_nC,time_hr_min,Energy_MeV +1.0,22.6,101.04,50,9.722,9.723,9.717,15.53,70 +1.0,22.6,101.04,67,9.743,9.744,9.747,15.46,70 +1.0,22.6,101.04,83,9.756,9.754,9.759,15.39,70 +1.0,22.6,101.04,125,9.769,9.774,9.769,15.32,70 +1.0,22.6,101.04,200,9.785,9.784,9.787,15.27,70 +0.2,22.0,101.01,50,7.929,7.928,7.928,14.16,150 +0.2,22.0,101.01,67,7.956,7.955,7.956,14.23,150 +0.2,22.0,101.01,83,7.968,7.968,7.967,14.55,150 +0.2,22.0,101.01,125,7.985,7.985,7.986,14.29,150 +0.2,22.0,101.01,200,7.994,7.995,7.996,14.32,150 +0.5,22.0,101.01,50,7.838,7.841,7.839,15.05,150 +0.5,22.0,101.01,67,7.903,7.906,7.903,15.01,150 +0.5,22.0,101.01,83,7.941,7.939,7.937,14.46,150 +0.5,22.0,101.01,125,7.966,7.970,7.984,14.41 # OBS: 7.984 might be wrong (DRF?),150 +0.5,22.0,101.01,200,7.990,7.986,7.986,14.38,150 +1.0,22.0,101.01,50,7.715,7.718,7.719,15.08,150 +1.0,22.0,101.01,67,7.839,7.833,7.839,15.11,150 +1.0,22.0,101.01,83,7.889,7.890,7.890,15.14,150 +1.0,22.0,101.01,125,7.959,7.950,7.951,15.17,150 +1.0,22.0,101.01,200,7.983,7.984,7.988,15.20,150 +0.2,22.1,99.89,50,7.826,7.820,7.816,15.xx?,226 +0.2,22.1,99.89,67,7.872,7.872,7.869,15.xx?,226 +0.2,22.1,99.89,83,7.890,7.892,7.894,14.5x?,226 +0.2,22.1,99.89,125,7.916,7.918,7.917,14.5x?,226 +0.2,22.1,99.89,200,7.937,7.935,7.939,14.45,226 +0.5,22.1,99.89,50,7.655,7.658,7.656,14.34,226 +0.5,22.1,99.89,67,7.783,7.791,7.783,14.34,226 +0.5,22.1,99.89,83,7.830,7.837,7.837,14.34,226 +0.5,22.1,99.89,125,7.899,7.903,7.903,14.44,226 +0.5,22.1,99.89,200,7.933,7.929,7.955,14.44,226 +1.0,22.1,99.89,50,7.426,7.418,7.432,13.xx,226 +1.0,22.1,99.89,67,7.630,7.637,7.633,13.xx,226 +1.0,22.1,99.89,83,7.752,7.756,7.752,13.xx?,226 +1.0,22.1,99.89,125,7.859,7.855,7.859,12.xx?,226 +1.0,22.1,99.89,200,7.923,7.915,np.nan,12.46 # we only measured twice here...,226 +0.2,22.0,101.01,50,7.886,7.899,7.899,14.08,244 +0.2,22.0,101.01,67,7.960,7.959,7.955,14.00,244 +0.2,22.0,101.01,83,7.982,7.979,7.986,13.55,244 +0.2,22.0,101.01,125,8.021,8.018,8.022,13.38,244 +0.2,22.0,101.01,200,8.040,8.044,8.039,13.32,244 +0.5,22.1,99.96,50,7.655,7.660,7.665,16.05,244 +0.5,22.1,99.96,67,7.808,7.794,7.806,15.xx,244 +0.5,22.1,99.96,83,7.867,7.869,7.874,15.56,244 +0.5,22.1,99.96,125,7.937,7.945,7.939,15.53,244 +0.5,22.1,99.96,200,7.974,7.974,7.962,15.50,244 +1.0,22.1,99.96,50,7.379,7.383,7.377,15.33,244 +1.0,22.1,99.96,67,7.655,7.640,7.649,15.34,244 +1.0,22.1,99.96,83,7.769,7.769,7.776,15.37,244 +1.0,22.1,99.96,125,7.898,7.895,7.904,15.40,244 +1.0,22.1,99.96,200,7.953,7.992,7.982,15.45,244 diff --git a/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/244MeV/1.0.dat b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/244MeV/1.0.dat new file mode 100644 index 0000000..cfa7e17 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/244MeV/1.0.dat @@ -0,0 +1,9 @@ +# OBS: Varian time is approx 3 mins off +# DRF, T [C], P [kPa], voltage [V], charge [nC], charge [nC], charge [nC], time [hr:min] +# ----------------------------------------------------- +1.0, 22.1, 99.96, 50, 7.379, 7.383, 7.377, 15.33 +1.0, 22.1, 99.96, 67, 7.655, 7.640, 7.649, 15.34 +1.0, 22.1, 99.96, 83, 7.769, 7.769, 7.776, 15.37 +1.0, 22.1, 99.96, 125, 7.898, 7.895, 7.904, 15.40 +1.0, 22.1, 99.96, 200, 7.953, 7.992, 7.982, 15.45 + diff --git a/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/70MeV/1.0.dat b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/70MeV/1.0.dat new file mode 100644 index 0000000..9dd6896 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/data_raw/70MeV/1.0.dat @@ -0,0 +1,8 @@ +# OBS: Varian time is approx 3 mins off +# DRF, T [C], P [kPa], voltage [V], charge [nC], charge [nC], charge [nC], time [hr:min] +# ----------------------------------------------------- +1.0, 22.6, 101.04, 50, 9.722, 9.723, 9.717, 15.53 +1.0, 22.6, 101.04, 67, 9.743, 9.744, 9.747, 15.46 +1.0, 22.6, 101.04, 83, 9.756, 9.754, 9.759, 15.39 +1.0, 22.6, 101.04, 125, 9.769, 9.774, 9.769, 15.32 +1.0, 22.6, 101.04, 200, 9.785, 9.784, 9.787, 15.27 diff --git a/backend-performance-benchmark/2019_DCPT/experimental-data-200V/how_to_reproduce_results.md b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/how_to_reproduce_results.md new file mode 100644 index 0000000..20aa9f6 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/how_to_reproduce_results.md @@ -0,0 +1,62 @@ +# Experimental data and how to compute results + +## Basic information + +The results compare `IonTracks-Cython` predictions against experimental recombination factors (`k_s`) for: + +- proton beam +- 200 V +- 0.2 cm electrode gap (2 mm) +- `RDD_model = Gauss` +- backend `cython` + +## How to regenerate results for re-benchmark + +From the repository root: + +1. Create a config file for this dataset (for example `validation/config_2019_dcpt_results.yaml`): + +```yaml +experimental_data_path: experimental-data/2019_DCPT/recombination_200V_data.csv +output_dir: experimental-data/2019_DCPT/results +simulation: + backend: cython + voltage_V: 200.0 + electrode_gap_cm: 0.2 + particle: proton + RDD_model: Gauss + grid_size_um: 5.0 + a0_nm: 8.0 + use_beta: false + seed: null + SHOW_PLOT: false + PRINT_parameters: false + debug: false +compare_initial_recombination: true +compare_continuous_beam: true +dose_rate_column: dose_rate_air_Gy_s +energy_column: Energy_MeV +ks_column: k_s +plot_format: png +plot_dpi: 300 +plot_style: whitegrid +``` + +2. Run: + +```bash +python -m validation.run_comparison validation/config_2019_dcpt_results.yaml +``` + +This command regenerates: + +- `comparison_initial.csv` +- `comparison_continuous.csv` +- `comparison_continuous_clean.csv` +- `initial_recombination_comparison.png` +- `continuous_beam_comparison.png` +- `relative_error.png` + +## Notes + +- Use air dose rate (`dose_rate_air_Gy_s`) for this dataset. The chamber is air-filled. \ No newline at end of file diff --git a/backend-performance-benchmark/2019_DCPT/experimental-data-200V/ks_200V/150MeV.txt b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/ks_200V/150MeV.txt new file mode 100644 index 0000000..7aa894d --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/ks_200V/150MeV.txt @@ -0,0 +1,5 @@ +Energy_MeV,dose_Gy,dose_rate_factor,time_s,dose_rate_water_Gy_s,dose_rate_air_Gy_s,k_s +150,0.672,1.00,0.004184,4.167,3.665,1.0025 +150,0.672,0.5,0.008216,2.122,1.866,1.0013 +150,0.672,0.2,0.020117,0.867,0.762,1.0005 + diff --git a/backend-performance-benchmark/2019_DCPT/experimental-data-200V/ks_200V/226MeV.txt b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/ks_200V/226MeV.txt new file mode 100644 index 0000000..4ae4cee --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/ks_200V/226MeV.txt @@ -0,0 +1,5 @@ +Energy_MeV,dose_Gy,dose_rate_factor,time_s,dose_rate_water_Gy_s,dose_rate_air_Gy_s,k_s +226,0.673,1.0,0.002770,6.378,5.610,1.0038 +226,0.673,0.5,0.005401,3.271,2.877,1.0019 +226,0.673,0.2,0.013849,1.276,1.122,1.0008 + diff --git a/backend-performance-benchmark/2019_DCPT/experimental-data-200V/ks_200V/244MeV.txt b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/ks_200V/244MeV.txt new file mode 100644 index 0000000..281772c --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/ks_200V/244MeV.txt @@ -0,0 +1,4 @@ +Energy_MeV,dose_Gy,dose_rate_factor,time_s,dose_rate_water_Gy_s,dose_rate_air_Gy_s,k_s +244,0.676,1.00,0.002562,6.939,6.103,1.0041 +244,0.676,0.5,0.00525,3.386,2.978,1.0020 +244,0.676,0.2,0.012956,1.372,1.207,1.0008 diff --git a/backend-performance-benchmark/2019_DCPT/experimental-data-200V/ks_200V/70MeV.txt b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/ks_200V/70MeV.txt new file mode 100644 index 0000000..f23d794 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/ks_200V/70MeV.txt @@ -0,0 +1,3 @@ +Energy_MeV,dose_Gy,dose_rate_factor,time_s,dose_rate_water_Gy_s,dose_rate_air_Gy_s,k_s +70,0.825,1.00,0.022265,0.936,0.823,1.0006 + diff --git a/backend-performance-benchmark/2019_DCPT/experimental-data-200V/recombination_200V_data.csv b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/recombination_200V_data.csv new file mode 100644 index 0000000..92fc6a9 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/recombination_200V_data.csv @@ -0,0 +1,11 @@ +Energy_MeV,dose_Gy,dose_rate_factor,time_s,dose_rate_water_Gy_s,dose_rate_air_Gy_s,k_s +150,0.672,1.0,0.004184,4.167,3.665,1.0025 +150,0.672,0.5,0.008216,2.122,1.866,1.0013 +150,0.672,0.2,0.020117,0.867,0.762,1.0005 +226,0.673,1.0,0.00277,6.378,5.61,1.0038 +226,0.673,0.5,0.005401,3.271,2.877,1.0019 +226,0.673,0.2,0.013849,1.276,1.122,1.0008 +244,0.676,1.0,0.002562,6.939,6.103,1.0041 +244,0.676,0.5,0.00525,3.386,2.978,1.002 +244,0.676,0.2,0.012956,1.372,1.207,1.0008 +70,0.825,1.0,0.022265,0.936,0.823,1.0006 diff --git a/backend-performance-benchmark/2019_DCPT/experimental-data-200V/recombination_vs_dose_rate.png b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/recombination_vs_dose_rate.png new file mode 100644 index 0000000..afcd2fa Binary files /dev/null and b/backend-performance-benchmark/2019_DCPT/experimental-data-200V/recombination_vs_dose_rate.png differ diff --git a/backend-performance-benchmark/2019_DCPT/plot_benchmark_results.py b/backend-performance-benchmark/2019_DCPT/plot_benchmark_results.py new file mode 100644 index 0000000..23f79b8 --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/plot_benchmark_results.py @@ -0,0 +1,676 @@ +""" +Program do tworzenia wykresów na podstawie wyników benchmarków. + +Usage: + python plot_benchmark_results.py + python plot_benchmark_results.py --input-dir benchmark_results + python plot_benchmark_results.py --summary-file summary_all_runs_20251210_003508.csv +""" + +import argparse +from pathlib import Path + +import matplotlib.pyplot as plt +import numpy as np +import pandas as pd +import seaborn as sns + +# ============================================================================ +# CONFIGURATION +# ============================================================================ + +parser = argparse.ArgumentParser( + description="Tworzy wykresy na podstawie wyników benchmarków" +) +parser.add_argument( + "--input-dir", + type=str, + default=None, + help="Katalog z wynikami benchmarków (domyślnie: benchmark_results)", +) +parser.add_argument( + "--summary-file", + type=str, + default=None, + help="Konkretny plik CSV z wynikami (opcjonalnie, jeśli nie podano, znajdzie najnowszy)", +) +parser.add_argument( + "--output-dir", + type=str, + default=None, + help="Katalog wyjściowy dla wykresów (domyślnie: plots w katalogu wyników)", +) +parser.add_argument( + "--backends", + nargs="+", + default=None, + help="Lista backendów do uwzględnienia na wykresach (domyślnie: wszystkie dostępne)", +) +parser.add_argument( + "--exclude-backends", + nargs="+", + default=None, + help="Lista backendów do wykluczenia z wykresów", +) + +args = parser.parse_args() + +# Ścieżki +SCRIPT_DIR = Path(__file__).parent + +if args.input_dir: + INPUT_DIR = Path(args.input_dir) +else: + INPUT_DIR = SCRIPT_DIR / "benchmark_results" + +if args.output_dir: + OUTPUT_DIR = Path(args.output_dir) +else: + OUTPUT_DIR = INPUT_DIR / "plots" + +OUTPUT_DIR.mkdir(parents=True, exist_ok=True) + +# ============================================================================ +# LOAD DATA +# ============================================================================ + +print("=" * 70) +print("TWORZENIE WYKRESÓW Z WYNIKÓW BENCHMARKÓW") +print("=" * 70) + +# Znajdź plik z wynikami +if args.summary_file: + summary_file = Path(args.summary_file) + if not summary_file.is_absolute(): + summary_file = INPUT_DIR / summary_file +else: + # Znajdź najnowszy plik summary + summary_files = list(INPUT_DIR.glob("summary_all_runs_*.csv")) + if not summary_files: + print(f"BŁĄD: Nie znaleziono plików summary_all_runs_*.csv w {INPUT_DIR}") + exit(1) + summary_file = max(summary_files, key=lambda p: p.stat().st_mtime) + print(f"Używam najnowszego pliku: {summary_file.name}") + +print(f"Wczytuję dane z: {summary_file}") + +# Wczytaj dane +summary_df = pd.read_csv(summary_file) +print(f"Wczytano {len(summary_df)} rekordów") + +# Filtruj tylko udane uruchomienia +successful_df = summary_df[summary_df["status"] == "success"].copy() +print(f"Udane uruchomienia: {len(successful_df)}") + +# Wyświetl dostępne backendy +available_backends = successful_df["backend"].unique() +print(f"Dostępne backendy: {', '.join(available_backends)}") + +# Filtruj backendy zgodnie z argumentami +if args.backends: + # Uwzględnij tylko wybrane backendy + selected_backends = [b.lower() for b in args.backends] + successful_df = successful_df[ + successful_df["backend"].str.lower().isin(selected_backends) + ].copy() + print(f"Wybrane backendy: {', '.join(selected_backends)}") + + # Sprawdź, które wybrane backendy mają wyniki + found_backends = successful_df["backend"].unique() + missing_backends = set(selected_backends) - set(b.lower() for b in found_backends) + if missing_backends: + print( + f"⚠ OSTRZEŻENIE: Następujące backendy nie mają wyników: {', '.join(missing_backends)}" + ) + print(" Będą pominięte na wykresach.") + +if args.exclude_backends: + # Wyklucz wybrane backendy + excluded_backends = [b.lower() for b in args.exclude_backends] + successful_df = successful_df[ + ~successful_df["backend"].str.lower().isin(excluded_backends) + ].copy() + print(f"Wykluczone backendy: {', '.join(excluded_backends)}") + +if len(successful_df) == 0: + print("BŁĄD: Brak udanych uruchomień do wizualizacji po zastosowaniu filtrów") + print(f" Dostępne backendy: {', '.join(available_backends)}") + exit(1) + +# Wyświetl finalne backendy do wizualizacji +final_backends = successful_df["backend"].unique() +print(f"Backendy do wizualizacji: {', '.join(final_backends)}") + +# ============================================================================ +# PLOT STYLE +# ============================================================================ + +sns.set_style("whitegrid") +plt.rcParams["figure.dpi"] = 100 +plt.rcParams["font.size"] = 10 +plt.rcParams["axes.labelsize"] = 12 +plt.rcParams["axes.titlesize"] = 14 +plt.rcParams["xtick.labelsize"] = 10 +plt.rcParams["ytick.labelsize"] = 10 +plt.rcParams["legend.fontsize"] = 10 + +# Kolory dla backendów +colors = ["#3498db", "#e74c3c", "#2ecc71", "#f39c12"] + +# ============================================================================ +# PLOT 1 & 2: Czas wykonania - porównanie średnich i rozkład (obok siebie) +# ============================================================================ + +print("\nTworzenie wykresu 1-2: Czas wykonania (porównanie średnich i rozkład)...") + +# Przygotuj dane dla obu wykresów +backends = successful_df["backend"].unique() +means = [] +stds = [] +valid_backends = [] +data_for_box = [] +labels = [] + +for backend in backends: + backend_data = successful_df[successful_df["backend"] == backend][ + "elapsed_time_seconds" + ] + if len(backend_data) > 0: + means.append(backend_data.mean()) + stds.append(backend_data.std()) + valid_backends.append(backend) + data_for_box.append(backend_data.values) + labels.append(backend.upper()) + +if len(valid_backends) == 0: + print(" ⚠ Pomijam wykres - brak danych") + skip_plot_exec_time = True +else: + skip_plot_exec_time = False + backends = valid_backends + +if not skip_plot_exec_time: + fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(14, 6)) + + # Wykres 1a: Średni czas wykonania z błędami (bar chart) + x_pos = np.arange(len(backends)) + width = 0.6 + + bars = ax1.bar( + x_pos, + means, + width, + yerr=stds, + capsize=10, + alpha=0.7, + color=colors[: len(backends)], + label="Mean ± std. dev.", + ) + + # Dodaj wartości na słupkach - umieść je nad error bars + for i, (bar, mean, std) in enumerate(zip(bars, means, stds)): + height = bar.get_height() + # Umieść tekst nad error bar (height + std + mały margines) + text_y = ( + height + std + max(20, height * 0.02) + ) # Dynamiczny margines zależny od wysokości + ax1.text( + bar.get_x() + bar.get_width() / 2.0, + text_y, + f"{mean:.1f}±{std:.1f}s", + ha="center", + va="bottom", + fontsize=10, + fontweight="bold", + ) + + ax1.set_ylabel("Execution Time [seconds]", fontsize=12) + ax1.set_xlabel("Backend", fontsize=12) + ax1.set_title("Mean Execution Time with Standard Deviation", fontsize=13) + ax1.set_xticks(x_pos) + ax1.set_xticklabels([b.upper() for b in backends]) + ax1.grid(True, alpha=0.3, axis="y") + + # Wykres 1b: Rozkład czasów wykonania (boxplot) + bp = ax2.boxplot(data_for_box, tick_labels=labels, patch_artist=True) + + # Koloruj boxy + for patch, color in zip(bp["boxes"], colors[: len(bp["boxes"])]): + patch.set_facecolor(color) + patch.set_alpha(0.7) + + # Ukryj medianę (pomarańczową linię) + for median in bp["medians"]: + median.set_visible(False) + + # Dodaj wartości wariancji (odchylenie standardowe) nad każdym boxem - w stylu jak na innych wykresach + for i, (data, label) in enumerate(zip(data_for_box, labels)): + mean_val = np.mean(data) + std_val = np.std(data) + max_val = np.max(data) + min_val = np.min(data) + # Umieść tekst nad boxem (max_val + margines) + text_y = max_val + (max_val - min_val) * 0.1 + ax2.text( + i + 1, + text_y, + f"{mean_val:.1f}±{std_val:.1f}s", + ha="center", + va="bottom", + fontsize=10, + fontweight="bold", + ) + + # Dodaj legendę wyjaśniającą elementy boxplotu + from matplotlib.lines import Line2D + + legend_elements = [ + Line2D( + [0], + [0], + marker="o", + color="w", + markerfacecolor="w", + markeredgecolor="black", + markersize=8, + linestyle="None", + label="Outliers", + ), + ] + ax2.legend(handles=legend_elements, loc="upper right", fontsize=10) + + ax2.set_ylabel("Execution Time [seconds]", fontsize=12) + ax2.set_xlabel("Backend", fontsize=12) + ax2.set_title("Execution Time Distribution for Different Backends", fontsize=13) + ax2.grid(True, alpha=0.3) + + plt.tight_layout() + plt.savefig(OUTPUT_DIR / "execution_time_comparison.png", dpi=300, bbox_inches="tight") + print(" Zapisano: execution_time_comparison.png") + +# ============================================================================ +# PLOT 3: Czas wykonania w czasie (dla każdego run) +# ============================================================================ + +print("\nTworzenie wykresu 3: Czas wykonania dla każdego run...") + +fig, ax = plt.subplots(figsize=(12, 6)) + +has_data = False +# Sprawdź liczbę unikalnych runów +unique_runs = successful_df["run_number"].nunique() if len(successful_df) > 0 else 0 +show_values = unique_runs < 20 + +for backend in successful_df["backend"].unique(): + backend_data = successful_df[successful_df["backend"] == backend].sort_values( + "run_number" + ) + if len(backend_data) > 0: + ax.plot( + backend_data["run_number"], + backend_data["elapsed_time_seconds"], + "o-", + label=backend.upper(), + markersize=8, + linewidth=2, + alpha=0.7, + ) + # Dodaj wartości nad punktami jeśli jest mniej niż 20 runów + if show_values: + for _, row in backend_data.iterrows(): + ax.text( + row["run_number"], + row["elapsed_time_seconds"], + f"{row['elapsed_time_seconds']:.1f}s", + ha="center", + va="bottom", + fontsize=9, + fontweight="bold", + ) + has_data = True + +if not has_data: + print(" ⚠ Pomijam wykres - brak danych") + skip_plot3 = True +else: + skip_plot3 = False + +if not skip_plot3: + ax.set_xlabel("Run Number", fontsize=12) + ax.set_ylabel("Execution Time [seconds]", fontsize=12) + ax.set_title("Execution Time for Consecutive Runs", fontsize=14) + ax.legend(fontsize=11) + ax.grid(True, alpha=0.3) + if len(successful_df) > 0: + ax.set_xticks(successful_df["run_number"].unique()) + + plt.tight_layout() + plt.savefig(OUTPUT_DIR / "execution_time_runs.png", dpi=300, bbox_inches="tight") + print(" Zapisano: execution_time_runs.png") + +# ============================================================================ +# PLOT 4: Stosunek czasów (speedup) +# ============================================================================ + +print("\nTworzenie wykresu 4: Stosunek czasów (speedup)...") + +# Znajdź najwolniejszy backend jako referencję +slowest_backend = ( + successful_df.groupby("backend")["elapsed_time_seconds"].mean().idxmax() +) +slowest_mean = successful_df[successful_df["backend"] == slowest_backend][ + "elapsed_time_seconds" +].mean() + +fig, ax = plt.subplots(figsize=(10, 6)) + +speedups = [] +speedup_stds = [] +labels_speedup = [] + +for backend in successful_df["backend"].unique(): + backend_data = successful_df[successful_df["backend"] == backend][ + "elapsed_time_seconds" + ] + speedup = slowest_mean / backend_data.mean() + speedup_std = speedup * (backend_data.std() / backend_data.mean()) + speedups.append(speedup) + speedup_stds.append(speedup_std) + labels_speedup.append(backend.upper()) + +if len(speedups) > 0: + x_pos = np.arange(len(labels_speedup)) + bars = ax.bar( + x_pos, + speedups, + width=0.6, + yerr=speedup_stds, + capsize=10, + alpha=0.7, + color=colors[: len(labels_speedup)], + ) + + # Dodaj wartości na słupkach - umieść je nad error bars + for bar, speedup, speedup_std in zip(bars, speedups, speedup_stds): + height = bar.get_height() + # Umieść tekst nad error bar (height + std + mały margines) + text_y = height + speedup_std + 0.1 + ax.text( + bar.get_x() + bar.get_width() / 2.0, + text_y, + f"{speedup:.2f}x", + ha="center", + va="bottom", + fontsize=11, + fontweight="bold", + ) + + # Linia referencyjna pokazuje baseline (1.0x = najwolniejszy backend) + ax.axhline( + y=1.0, + color="k", + linestyle="--", + linewidth=1, + alpha=0.5, + label=f"Baseline ({slowest_backend.upper()})", + ) + ax.set_ylabel("Speedup (relative to slowest)", fontsize=12) + ax.set_xlabel("Backend", fontsize=12) + ax.set_title( + f"Speedup Relative to {slowest_backend.upper()} (baseline = 1.0x)", fontsize=14 + ) + ax.set_xticks(x_pos) + ax.set_xticklabels(labels_speedup) + ax.grid(True, alpha=0.3, axis="y") + ax.legend() + + plt.tight_layout() + plt.savefig(OUTPUT_DIR / "speedup_comparison.png", dpi=300, bbox_inches="tight") + print(" Zapisano: speedup_comparison.png") + +# ============================================================================ +# PLOT 5: Błędy obliczeń (jeśli dostępne) +# ============================================================================ + +if "continuous_mean_error_%" in successful_df.columns: + print("\nTworzenie wykresu 5: Błędy obliczeń...") + + # Sprawdź, które backendy mają dane o błędach + backends_with_errors = [] + for backend in successful_df["backend"].unique(): + backend_errors = successful_df[successful_df["backend"] == backend][ + "continuous_mean_error_%" + ] + if len(backend_errors) > 0 and not backend_errors.isna().all(): + backends_with_errors.append(backend) + + if len(backends_with_errors) == 0: + print(" ⚠ Pomijam wykres - brak danych o błędach") + else: + fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(14, 6)) + + # Wykres 5a: Średni błąd + backends = backends_with_errors + mean_errors = [] + std_errors = [] + + for backend in backends: + backend_data = successful_df[successful_df["backend"] == backend][ + "continuous_mean_error_%" + ] + valid_data = backend_data.dropna() + if len(valid_data) > 0: + mean_errors.append(valid_data.mean()) + std_errors.append(valid_data.std()) + else: + mean_errors.append(0) + std_errors.append(0) + + if len(mean_errors) > 0: + x_pos = np.arange(len(backends)) + bars1 = ax1.bar( + x_pos, + mean_errors, + width=0.6, + yerr=std_errors, + capsize=10, + alpha=0.7, + color=colors[: len(backends)], + ) + + for bar, mean, std in zip(bars1, mean_errors, std_errors): + height = bar.get_height() + ax1.text( + bar.get_x() + bar.get_width() / 2.0, + height + std + std * 0.5, + f"{mean:.3f}±{std:.3f}%", + ha="center", + va="bottom", + fontsize=10, + fontweight="bold", + ) + + ax1.set_ylabel("Mean Relative Error [%]", fontsize=12) + ax1.set_xlabel("Backend", fontsize=12) + ax1.set_title("Mean Relative Error of Calculations", fontsize=13) + ax1.set_xticks(x_pos) + ax1.set_xticklabels([b.upper() for b in backends]) + ax1.grid(True, alpha=0.3, axis="y") + + # Wykres 5b: Rozkład błędów (boxplot) + error_data = [] + error_labels = [] + for backend in backends: + backend_errors = successful_df[successful_df["backend"] == backend][ + "continuous_mean_error_%" + ] + valid_errors = backend_errors.dropna() + if len(valid_errors) > 0: + error_data.append(valid_errors.values) + error_labels.append(backend.upper()) + + if len(error_data) > 0: + bp = ax2.boxplot( + error_data, tick_labels=error_labels, patch_artist=True + ) + for patch, color in zip(bp["boxes"], colors[: len(bp["boxes"])]): + patch.set_facecolor(color) + patch.set_alpha(0.7) + + # Ukryj medianę + for median in bp["medians"]: + median.set_visible(False) + + # Dodaj wariancję (odchylenie standardowe) nad każdym boxem - w stylu jak na innych wykresach + for i, (data, label) in enumerate(zip(error_data, error_labels)): + mean_val = np.mean(data) + std_val = np.std(data) + max_val = np.max(data) + min_val = np.min(data) + # Umieść tekst nad boxem (max_val + margines) + text_y = max_val + (max_val - min_val) * 0.1 + ax2.text( + i + 1, + text_y, + f"{mean_val:.3f}±{std_val:.3f}%", + ha="center", + va="bottom", + fontsize=10, + fontweight="bold", + ) + + ax2.set_ylabel("Relative Error [%]", fontsize=12) + ax2.set_xlabel("Backend", fontsize=12) + ax2.set_title("Relative Error Distribution", fontsize=13) + ax2.grid(True, alpha=0.3) + + plt.tight_layout() + plt.savefig( + OUTPUT_DIR / "error_comparison.png", dpi=300, bbox_inches="tight" + ) + print(" Zapisano: error_comparison.png") + +# ============================================================================ +# PLOT 6: Statystyki zbiorcze (tabela wizualna) +# ============================================================================ + +print("\nTworzenie wykresu 6: Statystyki zbiorcze...") + +# Przygotuj dane do tabeli +stats_data = [] +for backend in successful_df["backend"].unique(): + backend_data = successful_df[successful_df["backend"] == backend][ + "elapsed_time_seconds" + ] + if len(backend_data) > 0: + stats_data.append( + { + "Backend": backend.upper(), + "Mean [s]": f"{backend_data.mean():.2f}", + "Standard Deviation [s]": f"{backend_data.std():.2f}", + "Minimum [s]": f"{backend_data.min():.2f}", + "Maximum [s]": f"{backend_data.max():.2f}", + "Number of Runs": len(backend_data), + } + ) + +if "continuous_mean_error_%" in successful_df.columns: + for i, backend in enumerate(successful_df["backend"].unique()): + backend_data = successful_df[successful_df["backend"] == backend][ + "elapsed_time_seconds" + ] + if len(backend_data) > 0: + # Znajdź odpowiedni indeks w stats_data + backend_idx = next( + ( + j + for j, stat in enumerate(stats_data) + if stat["Backend"] == backend.upper() + ), + None, + ) + if backend_idx is not None: + backend_errors = successful_df[successful_df["backend"] == backend][ + "continuous_mean_error_%" + ] + valid_errors = backend_errors.dropna() + if len(valid_errors) > 0: + stats_data[backend_idx][ + "Mean Relative Error [%]" + ] = f"{valid_errors.mean():.3f}" + stats_data[backend_idx][ + "Standard Deviation Error [%]" + ] = f"{valid_errors.std():.3f}" + else: + stats_data[backend_idx]["Mean Error [%]"] = "N/A" + stats_data[backend_idx]["Std Error [%]"] = "N/A" + +stats_df = pd.DataFrame(stats_data) + + +# Funkcja do łamania długich nazw kolumn na wiele linii +def wrap_column_labels(columns, max_words_per_line=2): + """Łamie długie nazwy kolumn na wiele linii.""" + wrapped_columns = [] + for col in columns: + words = col.split() + if len(words) > max_words_per_line: + # Podziel na linie po max_words_per_line słów + lines = [] + for i in range(0, len(words), max_words_per_line): + lines.append(" ".join(words[i : i + max_words_per_line])) + wrapped_columns.append("\n".join(lines)) + else: + wrapped_columns.append(col) + return wrapped_columns + + +# Utwórz tabelę jako obraz +fig, ax = plt.subplots(figsize=(14, max(4, len(stats_df) * 0.5 + 1))) +ax.axis("tight") +ax.axis("off") + +# Przygotuj etykiety kolumn z łamaniem linii +wrapped_col_labels = wrap_column_labels(stats_df.columns, max_words_per_line=2) + +table = ax.table( + cellText=stats_df.values, + colLabels=wrapped_col_labels, + cellLoc="center", + loc="center", + bbox=[0, 0, 1, 1], +) + +table.auto_set_font_size(False) +table.set_fontsize(10) +table.scale(1, 2.2) # Zwiększ wysokość, żeby pomieścić wieloliniowe nagłówki + +# Koloruj nagłówki +for i in range(len(stats_df.columns)): + table[(0, i)].set_facecolor("#4CAF50") + table[(0, i)].set_text_props(weight="bold", color="white") + +# Koloruj wiersze na przemian +for i in range(1, len(stats_df) + 1): + for j in range(len(stats_df.columns)): + if i % 2 == 0: + table[(i, j)].set_facecolor("#f0f0f0") + +plt.title("Benchmark Summary Statistics", fontsize=14, fontweight="bold", pad=20) +plt.tight_layout() +plt.savefig(OUTPUT_DIR / "summary_statistics.png", dpi=300, bbox_inches="tight") +print(" Zapisano: summary_statistics.png") + +# ============================================================================ +# SUMMARY +# ============================================================================ + +print("\n" + "=" * 70) +print("WYKRESY ZAPISANE") +print("=" * 70) +print(f"Wszystkie wykresy zapisane w: {OUTPUT_DIR}") +print("\nUtworzone pliki:") +for plot_file in sorted(OUTPUT_DIR.glob("*.png")): + print(f" - {plot_file.name}") + +print("\n" + "=" * 70) diff --git a/backend-performance-benchmark/2019_DCPT/run_benchmark.py b/backend-performance-benchmark/2019_DCPT/run_benchmark.py new file mode 100644 index 0000000..1c92fac --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/run_benchmark.py @@ -0,0 +1,465 @@ +""" +Skrypt do uruchamiania testów eksperymentalnych dla różnych backendów +wielokrotnie i zbierania wyników oraz czasów wykonania. + +Usage: + python run_benchmark.py --runs 3 + python run_benchmark.py --runs 5 --backends cython numba +""" + +import argparse +import subprocess +import sys +import time +import threading +from datetime import datetime +from pathlib import Path +import pandas as pd +import json + +# ============================================================================ +# CONFIGURATION +# ============================================================================ + +parser = argparse.ArgumentParser( + description="Uruchamia testy eksperymentalne dla różnych backendów wielokrotnie" +) +parser.add_argument( + "--runs", + type=int, + default=3, + help="Liczba uruchomień dla każdego backendu (domyślnie: 3)", +) +parser.add_argument( + "--backends", + nargs="+", + default=["cython", "numba"], + choices=["cython", "numba"], + help="Lista backendów do przetestowania (domyślnie: cython numba)", +) +parser.add_argument( + "--base-output-dir", + type=str, + default=None, + help="Bazowy katalog wyjściowy (domyślnie: benchmark_results w katalogu skryptu)", +) + +args = parser.parse_args() + +# Ścieżki +SCRIPT_DIR = Path(__file__).parent +TEST_SCRIPT = SCRIPT_DIR / "test_experimental_data.py" + +if args.base_output_dir: + BASE_OUTPUT_DIR = Path(args.base_output_dir) +else: + BASE_OUTPUT_DIR = SCRIPT_DIR / "benchmark_results" + +BASE_OUTPUT_DIR.mkdir(parents=True, exist_ok=True) + +# ============================================================================ +# FUNCTIONS +# ============================================================================ + + +def run_test(backend: str, run_number: int, timeout: float = None) -> dict: + """ + Uruchamia test_experimental_data.py dla danego backendu i zwraca wyniki. + + Args: + backend: Backend do użycia ('cython', 'numba') + run_number: Numer uruchomienia (dla organizacji folderów) + timeout: Maksymalny czas wykonania w sekundach (None = brak limitu) + + Returns: + Słownik z wynikami: czas wykonania, status, ścieżka do wyników + """ + print(f"\n{'='*70}") + print(f"Uruchamianie: {backend} - Run {run_number}") + if timeout: + print(f"Timeout: {timeout:.2f} sekund (2x max(cython, numba))") + print(f"{'='*70}") + + # Utwórz folder dla tego uruchomienia + run_output_dir = BASE_OUTPUT_DIR / backend / f"run_{run_number:03d}" + run_output_dir.mkdir(parents=True, exist_ok=True) + + # Przygotuj komendę + # Flaga -u wymusza unbuffered output w Pythonie (ważne dla logów w czasie rzeczywistym) + cmd = [ + sys.executable, + "-u", # Unbuffered stdout/stderr + str(TEST_SCRIPT), + "--backend", + backend, + "--output-dir", + str(run_output_dir), + ] + + # Uruchom test i zmierz czas + start_time = time.time() + timeout_occurred = False + stdout_lines = [] + stderr_lines = [] + + print(f"[{datetime.now().strftime('%H:%M:%S')}] ▶ Rozpoczynam obliczenia...") + print(f"[{datetime.now().strftime('%H:%M:%S')}] 📋 Komenda: {' '.join(cmd)}") + if timeout: + print(f"[{datetime.now().strftime('%H:%M:%S')}] ⏱ Limit czasu: {timeout:.2f} sekund") + + try: + # Użyj Popen zamiast run, żeby móc wyświetlać output w czasie rzeczywistym + # Na Windows używamy unbuffered (bufsize=0) dla lepszej responsywności + import platform + import os + if platform.system() == 'Windows': + bufsize = 0 # Unbuffered na Windows + # Ustaw zmienne środowiskowe dla unbuffered output w Pythonie + env = os.environ.copy() + env['PYTHONUNBUFFERED'] = '1' + else: + bufsize = 1 # Line buffered na Unix + env = os.environ.copy() + env['PYTHONUNBUFFERED'] = '1' + + process = subprocess.Popen( + cmd, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + text=True, + bufsize=bufsize, + cwd=SCRIPT_DIR, + universal_newlines=True, # Dla kompatybilności + env=env, # Przekaż zmienne środowiskowe + ) + + # Funkcja do wyświetlania linii w czasie rzeczywistym + def log_line(prefix, line, is_error=False): + if line.strip(): + timestamp = datetime.now().strftime('%H:%M:%S') + elapsed = time.time() - start_time + if is_error: + print(f"[{timestamp}] [{elapsed:6.1f}s] {prefix}⚠ ERR: {line.rstrip()}", flush=True) + else: + print(f"[{timestamp}] [{elapsed:6.1f}s] {prefix}{line.rstrip()}", flush=True) + + # Czytaj output w czasie rzeczywistym używając wątków + def read_output(pipe, prefix, is_error=False, output_list=None): + try: + # Czytaj linia po linii - readline() powinien działać z unbuffered mode + while True: + line = pipe.readline() + if not line: # EOF + break + # Zapisz do listy jeśli potrzebne + if output_list is not None: + output_list.append(line) + # Wyświetl natychmiast + log_line(prefix, line, is_error) + except Exception as e: + error_msg = f"Error reading output: {e}\n" + if output_list is not None: + output_list.append(error_msg) + log_line(prefix, error_msg, is_error) + finally: + try: + pipe.close() + except: + pass + + # Uruchom wątki do czytania stdout i stderr + stdout_thread = threading.Thread( + target=read_output, + args=(process.stdout, f"[{backend.upper()}] ", False, stdout_lines), + daemon=True + ) + stderr_thread = threading.Thread( + target=read_output, + args=(process.stderr, f"[{backend.upper()}] ", True, stderr_lines), + daemon=True + ) + + stdout_thread.start() + stderr_thread.start() + + # Czekaj na zakończenie procesu z timeoutem + if timeout: + try: + process.wait(timeout=timeout) + except subprocess.TimeoutExpired: + print(f"[{datetime.now().strftime('%H:%M:%S')}] ⚠ TIMEOUT! Przekroczono limit czasu ({timeout:.2f} sekund)") + process.kill() + process.wait() + timeout_occurred = True + else: + process.wait() + + # Poczekaj aż wątki skończą czytać (max 2 sekundy) + stdout_thread.join(timeout=2) + stderr_thread.join(timeout=2) + + elapsed_time = time.time() - start_time + + # Utwórz obiekt result + result = type('obj', (object,), { + 'returncode': process.returncode, + 'stdout': ''.join(stdout_lines), + 'stderr': ''.join(stderr_lines) + })() + + except subprocess.TimeoutExpired: + elapsed_time = time.time() - start_time + timeout_occurred = True + print(f"[{datetime.now().strftime('%H:%M:%S')}] ⚠ TIMEOUT! Przekroczono limit czasu ({timeout:.2f} sekund)") + # Zabij proces jeśli jeszcze działa + result = type('obj', (object,), { + 'returncode': -1, + 'stdout': ''.join(stdout_lines), + 'stderr': f'Timeout after {timeout:.2f} seconds (exceeded 2x efficiency requirement)' + })() + except Exception as e: + elapsed_time = time.time() - start_time + print(f"[{datetime.now().strftime('%H:%M:%S')}] ❌ BŁĄD podczas uruchamiania: {e}") + result = type('obj', (object,), { + 'returncode': -1, + 'stdout': ''.join(stdout_lines), + 'stderr': str(e) + })() + + elapsed_time = time.time() - start_time + status_icon = "✓" if result.returncode == 0 and not timeout_occurred else "✗" + print(f"[{datetime.now().strftime('%H:%M:%S')}] {status_icon} Zakończono w {elapsed_time:.2f} sekund (kod: {result.returncode})") + + # Zapisz output do pliku + log_file = run_output_dir / "run_log.txt" + with open(log_file, "w", encoding="utf-8") as f: + f.write(f"Command: {' '.join(cmd)}\n") + f.write(f"Return code: {result.returncode}\n") + f.write(f"Elapsed time: {elapsed_time:.2f} seconds\n") + if timeout: + f.write(f"Timeout limit: {timeout:.2f} seconds\n") + if timeout_occurred: + f.write(f"TIMEOUT: Exceeded efficiency requirement (2x max(cython, numba))\n") + f.write("\n") + f.write("=" * 70 + "\n") + f.write("STDOUT:\n") + f.write("=" * 70 + "\n") + f.write(result.stdout) + f.write("\n" + "=" * 70 + "\n") + f.write("STDERR:\n") + f.write("=" * 70 + "\n") + f.write(result.stderr) + + # Określ status + if timeout_occurred: + status = "efficiency_failed" + status_message = "Przekroczono limit efektywności (2x max(cython, numba))" + elif result.returncode == 0: + status = "success" + status_message = None + else: + status = "failed" + status_message = None + + # Sprawdź czy są pliki wynikowe (tylko jeśli nie było timeoutu) + results_data = {} + if not timeout_occurred: + comparison_initial = run_output_dir / "comparison_initial.csv" + comparison_continuous = run_output_dir / "comparison_continuous.csv" + + # Wczytaj wyniki jeśli istnieją + if comparison_initial.exists(): + try: + df_initial = pd.read_csv(comparison_initial) + results_data["initial_mean_error_%"] = df_initial["relative_error_%"].mean() + results_data["initial_max_error_%"] = df_initial["relative_error_%"].max() + results_data["initial_min_error_%"] = df_initial["relative_error_%"].min() + except Exception as e: + print(f" Błąd przy wczytywaniu comparison_initial.csv: {e}") + + if comparison_continuous.exists(): + try: + df_continuous = pd.read_csv(comparison_continuous) + results_data["continuous_mean_error_%"] = df_continuous["relative_error_%"].mean() + results_data["continuous_median_error_%"] = df_continuous["relative_error_%"].median() + results_data["continuous_max_error_%"] = df_continuous["relative_error_%"].max() + results_data["continuous_min_error_%"] = df_continuous["relative_error_%"].min() + results_data["continuous_std_error_%"] = df_continuous["relative_error_%"].std() + results_data["continuous_successful_calculations"] = len(df_continuous) + except Exception as e: + print(f" Błąd przy wczytywaniu comparison_continuous.csv: {e}") + + result_dict = { + "backend": backend, + "run_number": run_number, + "status": status, + "elapsed_time_seconds": elapsed_time, + "return_code": result.returncode, + "output_dir": str(run_output_dir), + **results_data, + } + + if timeout_occurred: + result_dict["timeout_limit"] = timeout + result_dict["efficiency_requirement_failed"] = True + + return result_dict + + +def create_summary(all_results: list) -> pd.DataFrame: + """ + Tworzy zestawienie wyników wszystkich uruchomień. + """ + summary_data = [] + + for result in all_results: + summary_data.append(result) + + summary_df = pd.DataFrame(summary_data) + return summary_df + + +def create_statistics_summary(summary_df: pd.DataFrame) -> pd.DataFrame: + """ + Tworzy statystyki zbiorcze dla każdego backendu. + """ + stats_list = [] + + for backend in summary_df["backend"].unique(): + backend_data = summary_df[summary_df["backend"] == backend] + successful_runs = backend_data[backend_data["status"] == "success"] + efficiency_failed = backend_data[backend_data["status"] == "efficiency_failed"] + failed_runs = backend_data[backend_data["status"] == "failed"] + error_runs = backend_data[backend_data["status"] == "error"] + + stats = { + "backend": backend, + "total_runs": len(backend_data), + "successful_runs": len(successful_runs), + "efficiency_failed_runs": len(efficiency_failed), + "failed_runs": len(failed_runs), + "error_runs": len(error_runs), + } + + if len(successful_runs) > 0: + stats["mean_time_seconds"] = successful_runs["elapsed_time_seconds"].mean() + stats["std_time_seconds"] = successful_runs["elapsed_time_seconds"].std() + stats["min_time_seconds"] = successful_runs["elapsed_time_seconds"].min() + stats["max_time_seconds"] = successful_runs["elapsed_time_seconds"].max() + + # Dodaj statystyki błędów jeśli są dostępne + if "continuous_mean_error_%" in successful_runs.columns: + stats["mean_continuous_error_%"] = successful_runs["continuous_mean_error_%"].mean() + stats["std_continuous_error_%"] = successful_runs["continuous_mean_error_%"].std() + + if "initial_mean_error_%" in successful_runs.columns: + stats["mean_initial_error_%"] = successful_runs["initial_mean_error_%"].mean() + else: + stats["mean_time_seconds"] = None + stats["std_time_seconds"] = None + stats["min_time_seconds"] = None + stats["max_time_seconds"] = None + + # Dodaj informacje o efficiency_failed jeśli są + if len(efficiency_failed) > 0: + stats["efficiency_failed_mean_time"] = efficiency_failed["elapsed_time_seconds"].mean() + stats["efficiency_failed_max_time"] = efficiency_failed["elapsed_time_seconds"].max() + + stats_list.append(stats) + + return pd.DataFrame(stats_list) + + +# ============================================================================ +# MAIN EXECUTION +# ============================================================================ + +def main(): + print("=" * 70) + print("BENCHMARK TESTÓW EKSPERYMENTALNYCH") + print("=" * 70) + print(f"Backendy: {', '.join(args.backends)}") + print(f"Liczba uruchomień na backend: {args.runs}") + print(f"Katalog wyjściowy: {BASE_OUTPUT_DIR}") + print(f"Data rozpoczęcia: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}") + + all_results = [] + + # Uruchom testy dla każdego backendu + total_runs = len(args.backends) * args.runs + current_run = 0 + + for backend in args.backends: + print(f"\n[{datetime.now().strftime('%H:%M:%S')}] 🔄 Backend: {backend.upper()}") + for run_num in range(1, args.runs + 1): + current_run += 1 + print(f"\n[{datetime.now().strftime('%H:%M:%S')}] 📊 Postęp: {current_run}/{total_runs} uruchomień") + result = run_test(backend, run_num) + all_results.append(result) + + if result["status"] == "success": + print(f"[{datetime.now().strftime('%H:%M:%S')}] ✅ {backend} Run {run_num}: {result['elapsed_time_seconds']:.2f} sekund - SUKCES") + else: + print(f"[{datetime.now().strftime('%H:%M:%S')}] ❌ {backend} Run {run_num}: BŁĄD") + + # Utwórz zestawienia + print("\n" + "=" * 70) + print("TWORZENIE ZESTAWIENIA WYNIKÓW") + print("=" * 70) + + summary_df = create_summary(all_results) + stats_df = create_statistics_summary(summary_df) + + # Zapisz wyniki + timestamp = datetime.now().strftime("%Y%m%d_%H%M%S") + + # Pełne zestawienie + summary_file = BASE_OUTPUT_DIR / f"summary_all_runs_{timestamp}.csv" + summary_df.to_csv(summary_file, index=False) + print(f"✓ Zapisano pełne zestawienie: {summary_file}") + + # Statystyki zbiorcze + stats_file = BASE_OUTPUT_DIR / f"statistics_summary_{timestamp}.csv" + stats_df.to_csv(stats_file, index=False) + print(f"✓ Zapisano statystyki: {stats_file}") + + # JSON z metadanymi + metadata = { + "timestamp": timestamp, + "start_time": datetime.now().strftime("%Y-%m-%d %H:%M:%S"), + "backends": args.backends, + "runs_per_backend": args.runs, + "total_runs": len(all_results), + "base_output_dir": str(BASE_OUTPUT_DIR), + } + metadata_file = BASE_OUTPUT_DIR / f"metadata_{timestamp}.json" + with open(metadata_file, "w", encoding="utf-8") as f: + json.dump(metadata, f, indent=2) + print(f"✓ Zapisano metadane: {metadata_file}") + + # Wyświetl podsumowanie + print("\n" + "=" * 70) + print("PODSUMOWANIE") + print("=" * 70) + print("\nStatystyki czasów wykonania:") + display_cols = ["backend", "mean_time_seconds", "std_time_seconds", + "min_time_seconds", "max_time_seconds", + "successful_runs", "total_runs"] + available_cols = [col for col in display_cols if col in stats_df.columns] + print(stats_df[available_cols].to_string(index=False)) + + if "mean_continuous_error_%" in stats_df.columns: + print("\nStatystyki błędów (continuous beam):") + error_cols = ["backend", "mean_continuous_error_%", "std_continuous_error_%"] + available_error_cols = [col for col in error_cols if col in stats_df.columns] + if available_error_cols: + print(stats_df[available_error_cols].to_string(index=False)) + + print(f"\nWszystkie wyniki zapisane w: {BASE_OUTPUT_DIR}") + print(f"Data zakończenia: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}") + print("=" * 70) + + +if __name__ == "__main__": + main() + diff --git a/backend-performance-benchmark/2019_DCPT/test_experimental_data.py b/backend-performance-benchmark/2019_DCPT/test_experimental_data.py new file mode 100644 index 0000000..f3d565e --- /dev/null +++ b/backend-performance-benchmark/2019_DCPT/test_experimental_data.py @@ -0,0 +1,510 @@ +""" +Comprehensive script for testing experimental data from DCPT 2019 + +This script compares IonTracks calculation results with actual measurements +performed at Danish Center for Particle Therapy in 2019. + +Usage: + python test_experimental_data.py +""" + +import argparse +import io +import sys +from pathlib import Path + +# Ustaw kodowanie UTF-8 dla stdout/stderr (ważne na Windows) +if sys.platform == "win32": + sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8", errors="replace") + sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding="utf-8", errors="replace") + +import matplotlib.pyplot as plt +import numpy as np +import pandas as pd +import seaborn as sns + +# Add path to main project directory in a robust way +def find_project_root(start_path: Path, marker: str = "hadrons"): + current = start_path.resolve() + while current != current.parent: + if (current / marker).is_dir(): + return current + current = current.parent + raise RuntimeError(f"Could not find project root containing '{marker}' directory.") +project_root = find_project_root(Path(__file__).parent) +sys.path.insert(0, str(project_root)) + +from hadrons.functions import ( # noqa: E402 + E_MeV_u_to_LET_keV_um, + IonTracks_continuous_beam, + ks_initial_IonTracks, +) + +# ============================================================================ +# CONFIGURATION +# ============================================================================ + +# Parse command line arguments +parser = argparse.ArgumentParser(description="Test experimental data from DCPT 2019") +parser.add_argument( + "--backend", + type=str, + default="cython", + choices=["cython", "numba", "python"], + help="Backend to use: cython, numba, or python", +) +parser.add_argument( + "--output-dir", + type=str, + default=None, + help="Output directory (default: results in script directory)", +) +args = parser.parse_args() + +DATA_PATH = Path(__file__).parent / "recombination_200V_data.csv" +if args.output_dir: + OUTPUT_DIR = Path(args.output_dir) +else: + OUTPUT_DIR = Path(__file__).parent / "results" +OUTPUT_DIR.mkdir(parents=True, exist_ok=True) + +# Experimental parameters +VOLTAGE_V = 200 +ELECTRODE_GAP_CM = 0.2 # 2 mm +PARTICLE = "proton" +RDD_MODEL = "Gauss" # or "Geiss" +GRID_SIZE_UM = 5.0 +BACKEND = args.backend + +# ============================================================================ +# LOAD DATA +# ============================================================================ + +print("=" * 70) +print("TESTING EXPERIMENTAL DATA DCPT 2019") +print("=" * 70) + +if not DATA_PATH.exists(): + print(f"ERROR: File not found {DATA_PATH}") + print("Make sure recombination_200V_data.csv exists.") + sys.exit(1) + +exp_data = pd.read_csv(DATA_PATH) +# IMPORTANT: Use dose_rate_air_Gy_s (not dose_rate_water_Gy_s) because: +# - Ionization chamber is filled with AIR +# - doserate_to_fluence() converts dose rate in AIR to fluence +# - LET is calculated for AIR +# - Using water dose rate would cause ~13-14% error! +exp_data["dose_rate_air_Gy_min"] = exp_data["dose_rate_air_Gy_s"] * 60 + +print(f"\nLoaded {len(exp_data)} experimental measurements") +print(f"Energies: {sorted(exp_data['Energy_MeV'].unique())} MeV") +print(f"Voltage: {VOLTAGE_V} V") +print(f"Electrode gap: {ELECTRODE_GAP_CM} cm") + +# ============================================================================ +# METHOD 1: INITIAL RECOMBINATION (single tracks) +# ============================================================================ + +print("\n" + "=" * 70) +print("METHOD 1: INITIAL RECOMBINATION") +print("=" * 70) + +energies_MeV = sorted(exp_data["Energy_MeV"].unique()) +initial_results = [] + +for energy_MeV in energies_MeV: + print(f"Calculating for {energy_MeV} MeV...") + try: + result = ks_initial_IonTracks( + E_MeV_u=energy_MeV, + voltage_V=VOLTAGE_V, + electrode_gap_cm=ELECTRODE_GAP_CM, + particle=PARTICLE, + RDD_model=RDD_MODEL, + grid_size_um=GRID_SIZE_UM, + ) + initial_results.append(result) + except Exception as e: + print(f" Error for {energy_MeV} MeV: {e}") + continue + +if not initial_results: + print("ERROR: Failed to calculate any results for Initial Recombination") + sys.exit(1) + +initial_df = pd.concat(initial_results, ignore_index=True) + +# Number of ions is now calculated by numerical integration in the solver +# No need for analytical calculations - values are already in initial_df + +# Compare with experimental data (lowest dose rate = initial recombination) +comparison_initial = [] +for energy_MeV in energies_MeV: + exp_subset = exp_data[exp_data["Energy_MeV"] == energy_MeV] + k_s_exp_min = exp_subset["k_s"].min() # Lowest dose rate + + iontracks_subset = initial_df[initial_df["E_MeV_u"] == energy_MeV] + if len(iontracks_subset) > 0: + k_s_iontracks = iontracks_subset["ks"].values[0] + n_positive = iontracks_subset["n_positive_ions"].values[0] + n_negative = iontracks_subset["n_negative_ions"].values[0] + comparison_initial.append( + { + "Energy_MeV": energy_MeV, + "k_s_experimental": k_s_exp_min, + "k_s_IonTracks": k_s_iontracks, + "difference": k_s_iontracks - k_s_exp_min, + "relative_error_%": 100 * (k_s_iontracks - k_s_exp_min) / k_s_exp_min, + "n_positive_ions": n_positive, + "n_negative_ions": n_negative, + } + ) + +comparison_initial_df = pd.DataFrame(comparison_initial) +print("\nInitial Recombination Comparison:") +# Format for display +display_initial = comparison_initial_df.copy() +display_initial["n_positive_ions"] = display_initial["n_positive_ions"].apply( + lambda x: f"{x:.2e}" +) +display_initial["n_negative_ions"] = display_initial["n_negative_ions"].apply( + lambda x: f"{x:.2e}" +) +print(display_initial.to_string(index=False)) + +# ============================================================================ +# METHOD 2: CONTINUOUS BEAM (general recombination) +# ============================================================================ + +print("\n" + "=" * 70) +print("METHOD 2: CONTINUOUS BEAM (General Recombination)") +print("=" * 70) +print("WARNING: This may take several minutes...") + +continuous_results = [] + +for idx, row in exp_data.iterrows(): + if idx % 5 == 0: + print( + f"Progress: {idx + 1}/{len(exp_data)} ({100 * (idx + 1) / len(exp_data):.1f}%)" + ) + + try: + result = IonTracks_continuous_beam( + E_MeV_u=row["Energy_MeV"], + voltage_V=VOLTAGE_V, + doserate_Gy_min=row["dose_rate_air_Gy_min"], + electrode_gap_cm=ELECTRODE_GAP_CM, + particle=PARTICLE, + grid_size_um=GRID_SIZE_UM, + backend=BACKEND, + ) + continuous_results.append(result) + except Exception as e: + print(f" Error for row {idx}: {e}") + # Add NaN as result to preserve indices + continuous_results.append( + pd.DataFrame( + [ + { + "ks_IonTracks": np.nan, + "E_MeV_u": row["Energy_MeV"], + "LET_keV_um": np.nan, + "fluencerate_cm2_s": np.nan, + "doserate_Gy_min": row["dose_rate_air_Gy_min"], + } + ] + ) + ) + +if not continuous_results: + print("ERROR: Failed to calculate any results for Continuous Beam") + sys.exit(1) + +continuous_df = pd.concat(continuous_results, ignore_index=True) + +# Number of ions is now calculated by numerical integration in the solver +# For continuous beam, we need to calculate ions per second from total ions +# The solver returns total ions at the end of simulation, so we need to estimate rate + +# Get simulation time from solver parameters (approximate) +# Simulation time ≈ separation_time_steps * dt +# separation_time_steps ≈ electrode_gap / (2 * mobility * E * dt) +# For display purposes, we'll use the total ions and estimate per-second rate +ion_mobility = 1.65 # cm^2/(V·s) +Efield_V_cm = VOLTAGE_V / ELECTRODE_GAP_CM +# Approximate dt (will vary, but this is for display only) +approx_dt = 1e-9 # seconds (typical value) +separation_time_steps = int(ELECTRODE_GAP_CM / (2. * ion_mobility * Efield_V_cm * approx_dt)) +n_separation_times = 3 +simulation_time_s = separation_time_steps * n_separation_times * approx_dt + +for idx, row in continuous_df.iterrows(): + # Skip if ks_IonTracks is NaN (calculation failed) + if pd.isna(row.get("ks_IonTracks", np.nan)): + continuous_df.loc[idx, "n_positive_ions_per_s"] = np.nan + continuous_df.loc[idx, "n_negative_ions_per_s"] = np.nan + continuous_df.loc[idx, "n_positive_ions"] = np.nan + continuous_df.loc[idx, "n_negative_ions"] = np.nan + continue + + # Get total ions from solver (already calculated by numerical integration) + n_positive_total = row.get("n_positive_ions", 0.0) + n_negative_total = row.get("n_negative_ions", 0.0) + + # Calculate ions per second (average rate over simulation time) + if simulation_time_s > 0: + ions_per_second_positive = n_positive_total / simulation_time_s + ions_per_second_negative = n_negative_total / simulation_time_s + else: + ions_per_second_positive = 0.0 + ions_per_second_negative = 0.0 + + continuous_df.loc[idx, "n_positive_ions_per_s"] = ions_per_second_positive + continuous_df.loc[idx, "n_negative_ions_per_s"] = ions_per_second_negative + continuous_df.loc[idx, "n_positive_ions"] = n_positive_total + continuous_df.loc[idx, "n_negative_ions"] = n_negative_total + +# Comparison +# NOTE: We use dose_rate_air_Gy_s for calculations (not dose_rate_water_Gy_s) +# because the ionization chamber is filled with air, not water. +comparison_continuous = exp_data.copy() +comparison_continuous["k_s_IonTracks"] = continuous_df["ks_IonTracks"].values +comparison_continuous["n_positive_ions_per_s"] = continuous_df["n_positive_ions_per_s"].values +comparison_continuous["n_negative_ions_per_s"] = continuous_df["n_negative_ions_per_s"].values +comparison_continuous["n_positive_ions"] = continuous_df["n_positive_ions"].values +comparison_continuous["n_negative_ions"] = continuous_df["n_negative_ions"].values +comparison_continuous["difference"] = ( + comparison_continuous["k_s_IonTracks"] - comparison_continuous["k_s"] +) +comparison_continuous["relative_error_%"] = ( + 100 * comparison_continuous["difference"] / comparison_continuous["k_s"] +) +comparison_continuous["absolute_error"] = abs(comparison_continuous["difference"]) + +# Remove rows with NaN +comparison_continuous = comparison_continuous.dropna(subset=["k_s_IonTracks"]) + +# Print comparison table +print("\nContinuous Beam Comparison:") +# Create a display-friendly version for printing +display_continuous = comparison_continuous[ + [ + "Energy_MeV", + "dose_rate_air_Gy_s", + "k_s", + "k_s_IonTracks", + "difference", + "relative_error_%", + "n_positive_ions_per_s", + "n_negative_ions_per_s", + ] +].copy() +display_continuous = display_continuous.sort_values( + ["Energy_MeV", "dose_rate_air_Gy_s"] +) +# Format for better readability +display_continuous["dose_rate_air_Gy_s"] = display_continuous[ + "dose_rate_air_Gy_s" +].round(3) +display_continuous["k_s"] = display_continuous["k_s"].round(6) +display_continuous["k_s_IonTracks"] = display_continuous["k_s_IonTracks"].round(6) +display_continuous["difference"] = display_continuous["difference"].round(6) +display_continuous["relative_error_%"] = display_continuous["relative_error_%"].round(3) +display_continuous["n_positive_ions_per_s"] = display_continuous[ + "n_positive_ions_per_s" +].apply(lambda x: f"{x:.2e}") +display_continuous["n_negative_ions_per_s"] = display_continuous[ + "n_negative_ions_per_s" +].apply(lambda x: f"{x:.2e}") +print(display_continuous.to_string(index=False)) + +print("\n=== Error Statistics ===") +print( + f"Number of successful calculations: {len(comparison_continuous)}/{len(exp_data)}" +) +if len(comparison_continuous) > 0: + print(f"Mean absolute error: {comparison_continuous['absolute_error'].mean():.6f}") + print( + f"Mean relative error: {comparison_continuous['relative_error_%'].mean():.3f}%" + ) + print( + f"Median relative error: {comparison_continuous['relative_error_%'].median():.3f}%" + ) + print(f"Max relative error: {comparison_continuous['relative_error_%'].max():.3f}%") + print(f"Min relative error: {comparison_continuous['relative_error_%'].min():.3f}%") + print(f"Standard deviation: {comparison_continuous['relative_error_%'].std():.3f}%") + +print("\n=== Ion Statistics ===") +if len(comparison_continuous) > 0: + print(f"Mean positive ions per second: {comparison_continuous['n_positive_ions_per_s'].mean():.2e}") + print(f"Mean negative ions per second: {comparison_continuous['n_negative_ions_per_s'].mean():.2e}") + print(f"Min positive ions per second: {comparison_continuous['n_positive_ions_per_s'].min():.2e}") + print(f"Max positive ions per second: {comparison_continuous['n_positive_ions_per_s'].max():.2e}") + +# ============================================================================ +# VISUALIZATION +# ============================================================================ + +print("\n" + "=" * 70) +print("GENERATING PLOTS") +print("=" * 70) + +# Set plot style +sns.set_style("whitegrid") +plt.rcParams["figure.dpi"] = 100 + +# Plot 1: Initial Recombination +if len(comparison_initial_df) > 0: + fig, ax = plt.subplots(figsize=(10, 6)) + ax.plot( + comparison_initial_df["Energy_MeV"], + comparison_initial_df["k_s_experimental"], + "o-", + label="Experimental", + markersize=10, + linewidth=2, + color="blue", + ) + ax.plot( + comparison_initial_df["Energy_MeV"], + comparison_initial_df["k_s_IonTracks"], + "s--", + label="IonTracks", + markersize=10, + linewidth=2, + color="red", + ) + ax.set_xlabel("Proton Energy [MeV]", fontsize=12) + ax.set_ylabel("$k_s$", fontsize=12) + ax.set_title("Initial Recombination: Experiment vs. IonTracks", fontsize=14) + ax.legend(fontsize=11) + ax.grid(True, alpha=0.3) + plt.tight_layout() + plt.savefig(OUTPUT_DIR / "initial_recombination_comparison.png", dpi=300) + print("[OK] Saved: initial_recombination_comparison.png") + +# Plot 2: Continuous Beam - all energies +if len(comparison_continuous) > 0: + fig, ax = plt.subplots(figsize=(12, 7)) + colors = plt.cm.tab10(np.linspace(0, 1, len(energies_MeV))) + + for i, energy in enumerate(energies_MeV): + subset_exp = comparison_continuous[ + comparison_continuous["Energy_MeV"] == energy + ] + subset_exp = subset_exp.sort_values("dose_rate_air_Gy_s") + + subset_iontracks = continuous_df[continuous_df["E_MeV_u"] == energy] + if len(subset_iontracks) > 0: + subset_iontracks = subset_iontracks.sort_values("doserate_Gy_min") + + ax.plot( + subset_exp["dose_rate_air_Gy_s"], + subset_exp["k_s"], + "o-", + label=f"Exp. {energy} MeV", + markersize=6, + linewidth=1.5, + color=colors[i], + alpha=0.7, + ) + ax.plot( + subset_iontracks["doserate_Gy_min"] / 60, + subset_iontracks["ks_IonTracks"], + "s--", + label=f"IonTracks {energy} MeV", + markersize=6, + linewidth=1.5, + color=colors[i], + ) + + ax.set_xlabel("Dose Rate in Air [Gy/s]", fontsize=12) + ax.set_ylabel("$k_s$", fontsize=12) + ax.set_title("Continuous Beam: Experiment vs. IonTracks", fontsize=14) + ax.legend(ncol=2, fontsize=9) + ax.grid(True, alpha=0.3) + plt.tight_layout() + plt.savefig(OUTPUT_DIR / "continuous_beam_comparison.png", dpi=300) + print("[OK] Saved: continuous_beam_comparison.png") + + # Plot 3: Relative error + fig, ax = plt.subplots(figsize=(10, 6)) + for i, energy in enumerate(energies_MeV): + subset = comparison_continuous[comparison_continuous["Energy_MeV"] == energy] + subset = subset.sort_values("dose_rate_air_Gy_s") + if len(subset) > 0: + ax.plot( + subset["dose_rate_air_Gy_s"], + subset["relative_error_%"], + "o-", + label=f"{energy} MeV", + markersize=6, + linewidth=1.5, + color=colors[i], + ) + + ax.axhline(y=0, color="r", linestyle=":", linewidth=2) + ax.set_xlabel("Dose Rate in Air [Gy/s]", fontsize=12) + ax.set_ylabel("Relative Error [%]", fontsize=12) + ax.set_title("IonTracks Relative Error", fontsize=14) + ax.legend(fontsize=11) + ax.grid(True, alpha=0.3) + plt.tight_layout() + plt.savefig(OUTPUT_DIR / "relative_error.png", dpi=300) + print("[OK] Saved: relative_error.png") + +# ============================================================================ +# SAVE RESULTS +# ============================================================================ + +print("\n" + "=" * 70) +print("SAVING RESULTS") +print("=" * 70) + +# Save comparisons to CSV +if len(comparison_initial_df) > 0: + comparison_initial_df.to_csv(OUTPUT_DIR / "comparison_initial.csv", index=False) + print("[OK] Saved: comparison_initial.csv") + print(f" Includes ion counts: positive and negative ions per track") + +if len(comparison_continuous) > 0: + # Save full comparison (includes all original columns for reference) + comparison_continuous.to_csv(OUTPUT_DIR / "comparison_continuous.csv", index=False) + print("[OK] Saved: comparison_continuous.csv") + print(" NOTE: Calculations used dose_rate_air_Gy_s (not dose_rate_water_Gy_s)") + + # Also save a clean version with only essential columns + comparison_clean = comparison_continuous[ + [ + "Energy_MeV", + "dose_rate_air_Gy_s", + "k_s", + "k_s_IonTracks", + "difference", + "relative_error_%", + "absolute_error", + ] + ] + comparison_clean = comparison_continuous[ + [ + "Energy_MeV", + "dose_rate_air_Gy_s", + "k_s", + "k_s_IonTracks", + "difference", + "relative_error_%", + "absolute_error", + "n_positive_ions_per_s", + "n_negative_ions_per_s", + ] + ] + comparison_clean.to_csv(OUTPUT_DIR / "comparison_continuous_clean.csv", index=False) + print("[OK] Saved: comparison_continuous_clean.csv (essential columns only)") + print(f" Includes ion counts: positive and negative ions per second") + +print(f"\nAll results saved in: {OUTPUT_DIR}") +print("\n" + "=" * 70) +print("TESTING COMPLETED") +print("=" * 70) diff --git a/backend-performance-benchmark/README.md b/backend-performance-benchmark/README.md new file mode 100644 index 0000000..9a0d122 --- /dev/null +++ b/backend-performance-benchmark/README.md @@ -0,0 +1,160 @@ +# 2019_DCPT Backend Engines (BE) Benchmark + +## Objective +This README documents **backend engine (BE) comparison** for `IonTracks-Cython` on the `2019_DCPT` case. + +The comparison focuses on: + +- runtime performance, +- numerical agreement with experimental recombination data, +- run-to-run stability, +- practical backend selection trade-offs. + +## Scope and benchmark setup +Benchmark target: `benchmark/2019_DCPT/` + +Compared backends: + +- `python` +- `cython` +- `numba` + +Benchmark metadata (`benchmark/2019_DCPT/benchmark_results/metadata_20251210_003508.json`): + +- runs per backend: 10 +- total runs: 30 +- status labels: `success`, `efficiency_failed`, `failed` + +## Experimental reference data (used for BE comparison) +The benchmark is evaluated against the experimental dataset now available under: + +- `benchmark/2019_DCPT/experimental-data-200V/recombination_200V_data.csv` + +Dataset summary: + +- particle: proton beam +- chamber voltage: 200 V +- electrode gap: 0.2 cm (2 mm) +- energies: 70, 150, 226, 244 MeV +- reference output: recombination factor `k_s` + +Supporting context is included in: + +- `benchmark/2019_DCPT/experimental-data-200V/README.md` + +## Where benchmark outputs are stored +Main benchmark outputs are in: + +- `benchmark/2019_DCPT/benchmark_results/summary_all_runs_20251210_003508.csv` +- `benchmark/2019_DCPT/benchmark_results/statistics_summary_20251210_003508.csv` +- `benchmark/2019_DCPT/benchmark_results/plots/` +- `benchmark/2019_DCPT/benchmark_results/cython/run_001 ... run_010/` +- `benchmark/2019_DCPT/benchmark_results/numba/run_001 ... run_010/` +- `benchmark/2019_DCPT/benchmark_results/python/run_001 ... run_010/` + +Each successful `cython`/`numba` run contains: + +- `comparison_initial.csv` +- `comparison_continuous.csv` +- `comparison_continuous_clean.csv` +- `initial_recombination_comparison.png` +- `continuous_beam_comparison.png` +- `relative_error.png` +- `run_log.txt` + +`python` runs store logs only (`run_log.txt`) due to efficiency failures. + +## BE comparison results +### 1) Performance (execution time) +Average runtime over 10 runs: + +- `numba`: **404.58 s** (std 7.80 s, min 394.73 s, max 420.40 s) +- `cython`: **1155.34 s** (std 38.46 s, min 1093.96 s, max 1208.29 s) +- `python`: **6953.67 s** (10/10 `efficiency_failed`, max 47830.96 s) + +Outlier-aware view: + +- `python` without the 47,830.96 s outlier: **2411.75 s** mean (n=9) + +Relative speed: + +- `numba` vs `cython`: **2.86x faster** +- `numba` vs `python`: **17.19x faster** (with outlier) +- `cython` vs `python`: **6.02x faster** (with outlier) +- without the python outlier: `numba` is still **5.96x** faster than `python` + +![Execution Time Comparison](./2019_DCPT/benchmark_results/plots/execution_time_comparison.png) + +![Execution Time Across Runs](./2019_DCPT/benchmark_results/plots/execution_time_runs.png) + +### 2) Accuracy - initial recombination +For `cython` and `numba`, results are effectively identical: + +- mean relative error: **-0.0455%** +- range: **-0.0649% to -0.0238%** + +Interpretation: no meaningful BE-level difference for initial recombination on this case. + +### 3) Accuracy - continuous beam +Mean relative error across runs: + +- `cython`: **0.05997%** (std 0.00298 pp) +- `numba`: **0.09935%** (std 0.00433 pp) + +Observed maxima in runs: + +- `cython`: typically ~0.10-0.12% +- `numba`: typically ~0.18-0.20% + +Accuracy delta (`cython` advantage): + +- absolute: **0.0394 percentage points** +- relative reduction vs `numba`: **~39.6%** + +![Error Comparison](./2019_DCPT/benchmark_results/plots/error_comparison.png) + +### 4) Stability +- `numba`: very stable runtime distribution (low variance). +- `cython`: moderate runtime variance, all runs successful. +- `python`: fails the efficiency criterion in all runs. + +Efficiency criterion used for `python` in this benchmark: + +- timeout threshold per run was set to **2x max(runtime of `cython`, runtime of `numba`)**, +- when this threshold was exceeded, the run was marked as `efficiency_failed`. + +![Speedup Comparison](./2019_DCPT/benchmark_results/plots/speedup_comparison.png) + +![Summary Statistics](./2019_DCPT/benchmark_results/plots/summary_statistics.png) + +## Interpretation for backend choice +- If primary priority is **runtime throughput/latency**, choose **`numba`**. +- If primary priority is **continuous-beam numerical accuracy**, choose **`cython`**. +- `python` is not suitable for this benchmark profile under the current efficiency constraint. +- In practice for this workload, `python` should be considered **not recommended in all cases** (performance and efficiency are consistently inferior to both accelerated backends). + +In short, this benchmark shows a clear BE trade-off: + +- **`numba` = best speed** +- **`cython` = best continuous-beam accuracy** + +## How to reproduce the benchmark inputs/results +A short reproduction note is included here: + +- `benchmark/2019_DCPT/experimental-data-200V/how_to_reproduce_results.md` + +Use that guide to regenerate the comparison artifacts (`comparison_*.csv`, plots, relative error chart) from the experimental data configuration. + +Primary scripts for rerunning BE benchmark/plots: + +- `benchmark/2019_DCPT/run_benchmark.py` +- `benchmark/2019_DCPT/plot_benchmark_results.py` + +PowerShell example: + +```powershell +python .\benchmark\2019_DCPT\run_benchmark.py +python .\benchmark\2019_DCPT\plot_benchmark_results.py +``` + +Note: if you reproduce from custom config files, make sure the experimental data path points to the current benchmark-local dataset (`benchmark/2019_DCPT/experimental-data-200V/...`).