diff --git a/TrimSP.html b/TrimSP.html
index 0a2176f..a24376c 100644
--- a/TrimSP.html
+++ b/TrimSP.html
@@ -215,17 +215,9 @@
- Nonlocal (Lindhard-Scharff).
- Local (Oen-Robinson).
- -
- Equipartition of local and nonlocal models (i.e., options 1 & 2).
-
- -
- Nonlocal (Anderson-Ziegler tables for hydrogen);
- must be used for hydrogen-like projectile with energies > 10 keV.
-
- -
- Nonlocal (Ziegler tables for helium);
- must be used for helium-like projectiles with energies > 50 keV.
-
+ - Equipartition of local and nonlocal models (i.e., options 1 & 2).
+ - Nonlocal (Anderson-Ziegler tables for hydrogen); must be used for hydrogen-like projectile with energies > 10 keV.
+ - Nonlocal (Ziegler tables for helium); must be used for helium-like projectiles with energies > 50 keV.
Note: options 1, 2, and 3 can only be used at energies below the stopping power maximum.
@@ -252,8 +244,7 @@
- Nonlocal (Lindhard-Scharff).
- Local (Oen-Robinson).
- -
- Equipartition of local and nonlocal models (i.e., options 1 & 2).
+
- Equipartition of local and nonlocal models (i.e., options 1 & 2).
Note: options 1, 2, and 3 can only be used at energies below the stopping power maximum.
diff --git a/TrimSPlib.js b/TrimSPlib.js
index 7939e7a..51366b8 100644
--- a/TrimSPlib.js
+++ b/TrimSPlib.js
@@ -677,7 +677,7 @@ function rho_fun()
}
document.getElementById(rhoLi).value = density_estimate;
- alert("Warning: Density for this layer is only an estimate!")
+ alert("Warning: The density for this layer is only an estimate!")
}
}
@@ -1054,7 +1054,7 @@ function startSequence(All) {
trimBin = "trimspNL";
}
console.log(trimBin);
-
+
// Check if workPath exists otherwise create it
checkDir(All['workPath']); // from TrimSPelec.js, Electron/Node specific
@@ -1065,6 +1065,8 @@ function startSequence(All) {
// This is a flag to indicate whether the lists of values and inclements are the same size
All["SdzFlag"]=0;
var SValues = [];
+ let ScanName = "E";
+ let ScanAttrib = "valEnergy";
if (All["scanSeq"]) {
// For multiple runs or a scan
if (All["scanType"]=="scanVals") {
@@ -1077,10 +1079,6 @@ function startSequence(All) {
}
}
- let ScanName = "";
- let ScanAttrib = "";
- ScanName = "E";
- ScanAttrib = "valEnergy";
if (All["comboScan"]==1) {
ScanName = "SigE";
ScanAttrib = "sigEnergy";
@@ -1097,88 +1095,42 @@ function startSequence(All) {
ScanName = "Ld"+All["scandL"];
ScanAttrib = "L"+All["scandL"]+"d";
}
-
- let iScan=0;
- for (var SValue of SValues) {
- document.getElementById(ScanAttrib).value = SValue;
- All[ScanAttrib]=SValue;
- if ( All["SdzFlag"] == 1) {
- if (All["comboScan"]=="Energy") {
- document.getElementById(ScanAttrib).value = SdzValues[iScan];
- } else if (All["comboScan"]=="") {
- document.getElementById(ScanAttrib).value = SdzValues[iScan];
- }
- }
- let eingabe1=CreateInpFile(All);
- if (eingabe1=="ERROR") {return(0);}
- let FILENAME=All["workPath"]+"/"+All["fileNamePrefix"]+"_"+ScanName+SValue;
- writeAsciiFile(FILENAME+".inp",eingabe1)
- // Use Linux version
- Progress=Progress+90/SValues.length;
- // Update GUI progress bar
- cmd = "cd "+All["workPath"]+";cp "+FILENAME+".inp eingabe1.inp;"+trimBin;
- // Execute command
- execute(cmd);
-
- for (let ext of [".err",".out",".rge"]) {
- cmd = "cd "+All["workPath"]+";mv -f ausgabe1"+ext+" "+FILENAME+ext;
- execute(cmd);
- }
- let [cols,data]= readDatFile(FILENAME+".rge");
- // convert depth to nm and normalize stopping profile
- let depth=data[0];
- let nmuons=data[1];
- let dz = (depth[1]-depth[0])/10;
- let norm = dz*sum(nmuons)/100;
- for (let i=0; i