From 163935e2bace04e885790f37fcf342f73dcf1f32 Mon Sep 17 00:00:00 2001 From: Zaher Salman Date: Wed, 4 Jan 2023 11:46:40 +0100 Subject: [PATCH] Add option to force the use of the old ICRU parameters. --- TrimSP.html | 12 ++++++++++-- TrimSPlib.js | 5 ++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/TrimSP.html b/TrimSP.html index a39210c..261cd02 100644 --- a/TrimSP.html +++ b/TrimSP.html @@ -322,8 +322,16 @@ - - + + + + +
+ Use ICRU parameters + Force the TRIM.SP code to use stopping power + parameters from the old ICRU tables. +
+
IRL diff --git a/TrimSPlib.js b/TrimSPlib.js index 33f351f..7939e7a 100644 --- a/TrimSPlib.js +++ b/TrimSPlib.js @@ -867,6 +867,9 @@ function prep_cfg(toggle) { for (key of parOther) { All[key]= document.getElementById(key).value; } + + // Check ICRU flag, if checked use it + All["flagICRU"] = document.getElementById("flagICRU").checked; // Construct full content of cfg file TrimSPcfg = FilesSec + LayersSec + ProjSec + ScanSec; @@ -999,7 +1002,7 @@ function CreateInpFile(All) { All[LEkey+"E"+NEl]=ElE; // sprintf("%8.4f",$ElE); All["L"+i+"030"+NEl]=El030; // sprintf("%8.4f",$El030); - let ElST = StoppingCoefficients(El); + let ElST = StoppingCoefficients(El,All["flagICRU"]); let ElSTs = ElST.split(','); let j=1; for (let iElST of ElSTs) {