remove FRIB beam rate, improve UI
This commit is contained in:
parent
9871bdeeaa
commit
92ad200739
|
@ -1,6 +1,23 @@
|
||||||
var energy = [];
|
var energy = [];
|
||||||
var jpi = [];
|
var jpi = [];
|
||||||
var Name;
|
var Name;
|
||||||
|
var A;
|
||||||
|
var Sym;
|
||||||
|
|
||||||
|
function breakdownName(str) {
|
||||||
|
const match = str.match(/^(\d+)([a-zA-Z]+)$/);
|
||||||
|
if (match) {
|
||||||
|
const numberPart = parseInt(match[1]);
|
||||||
|
const stringPart = match[2];
|
||||||
|
return { numberPart, stringPart };
|
||||||
|
} else {
|
||||||
|
return null; // If the input string doesn't match the expected format
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var Sn = 999;
|
||||||
|
var Sp = 999;
|
||||||
|
var Sa = 999;
|
||||||
|
|
||||||
function GetData(){
|
function GetData(){
|
||||||
|
|
||||||
|
@ -19,6 +36,10 @@ function GetData(){
|
||||||
energy = [];
|
energy = [];
|
||||||
haha.forEach(line =>{
|
haha.forEach(line =>{
|
||||||
// console.log(line);
|
// console.log(line);
|
||||||
|
if( line.includes("Sn:") && line.length != 0 ){
|
||||||
|
Sn = line.substring(-8);
|
||||||
|
}
|
||||||
|
|
||||||
if( line.includes("<tr><td style=") && line.length != 0) {
|
if( line.includes("<tr><td style=") && line.length != 0) {
|
||||||
jpi.push(line.substring(98).slice(0,-10).trim());
|
jpi.push(line.substring(98).slice(0,-10).trim());
|
||||||
energy.push(parseFloat(line.substring(43,54).trim())/1000.);
|
energy.push(parseFloat(line.substring(43,54).trim())/1000.);
|
||||||
|
@ -43,6 +64,8 @@ function PlotLevels(){
|
||||||
const plotWidth = 300;
|
const plotWidth = 300;
|
||||||
const plotHeight = 600;
|
const plotHeight = 600;
|
||||||
const yMin = -1;
|
const yMin = -1;
|
||||||
|
|
||||||
|
let maxEx = parseFloat(document.getElementById('maxEx').value);
|
||||||
const maxExExp = Math.max(...energy);
|
const maxExExp = Math.max(...energy);
|
||||||
|
|
||||||
// console.log(maxExExp);
|
// console.log(maxExExp);
|
||||||
|
@ -63,7 +86,7 @@ function PlotLevels(){
|
||||||
range: [-0.5, 3]
|
range: [-0.5, 3]
|
||||||
},
|
},
|
||||||
yaxis: {
|
yaxis: {
|
||||||
range: [yMin, maxExExp + 1],
|
range: [yMin, maxEx + 2],
|
||||||
showline: false,
|
showline: false,
|
||||||
visible: false
|
visible: false
|
||||||
},
|
},
|
||||||
|
@ -137,10 +160,13 @@ function PlotLevels(){
|
||||||
// let NameYPos = (parseFloat(maxEx) + 2*fontSizeMeV);
|
// let NameYPos = (parseFloat(maxEx) + 2*fontSizeMeV);
|
||||||
// console.log(NameYPos);
|
// console.log(NameYPos);
|
||||||
|
|
||||||
|
let name2 = breakdownName(Name);
|
||||||
|
|
||||||
|
|
||||||
fig.layout.annotations.push({
|
fig.layout.annotations.push({
|
||||||
x: 0.5,
|
x: 0.5,
|
||||||
y: (parseFloat(maxEx) + 0.5),
|
y: (maxEx + 1),
|
||||||
text: Name,
|
text: "<sup>" + name2.numberPart +"</sup>" + name2.stringPart,
|
||||||
font: { size: 2 * fontSize },
|
font: { size: 2 * fontSize },
|
||||||
showarrow: false
|
showarrow: false
|
||||||
});
|
});
|
||||||
|
|
|
@ -20,16 +20,16 @@ print( "Content-type:text/html\r\n\r\n")
|
||||||
|
|
||||||
#print("==== requesting FRIB rate for A = %s, Z = %s " % (A, Z))
|
#print("==== requesting FRIB rate for A = %s, Z = %s " % (A, Z))
|
||||||
|
|
||||||
url = "https://groups.nscl.msu.edu/frib/rates/source/frib_yieldY.php?a="+A + "&z=" + Z + "&y=y"
|
#url = "https://groups.nscl.msu.edu/frib/rates/source/frib_yieldY.php?a="+A + "&z=" + Z + "&y=y"
|
||||||
|
|
||||||
fp = urllib.request.urlopen(url)
|
#fp = urllib.request.urlopen(url)
|
||||||
|
|
||||||
list = fp.read().decode("utf8").split(",")
|
#list = fp.read().decode("utf8").split(",")
|
||||||
|
|
||||||
#for haha in list:
|
#for haha in list:
|
||||||
# print(haha)
|
# print(haha)
|
||||||
|
|
||||||
print(list[5])
|
#print(list[5])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
2
digios
2
digios
|
@ -1 +1 @@
|
||||||
Subproject commit f50d916d3814bbee8973336adff7c0ea4bec588a
|
Subproject commit f5eef9c19afb833c4fa94ff5b88b4e602918733d
|
|
@ -75,7 +75,7 @@
|
||||||
<td><Input type="text" style="width:60px" value="0" id="beamEx" enterkeyhint="done"/></td>
|
<td><Input type="text" style="width:60px" value="0" id="beamEx" enterkeyhint="done"/></td>
|
||||||
<td>MeV</td>
|
<td>MeV</td>
|
||||||
<td id='beamSp'></td>
|
<td id='beamSp'></td>
|
||||||
<td id="beamYield"></td>
|
<!--td id="beamYield"></td>-->
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align:right"> Target (a):</td>
|
<td style="text-align:right"> Target (a):</td>
|
||||||
|
|
|
@ -112,14 +112,15 @@ var color = ['rgb(31,119,180)', // muted blue
|
||||||
'rgb(23,190,207)']; // blue-teal
|
'rgb(23,190,207)']; // blue-teal
|
||||||
|
|
||||||
function GetYield(A,Z){
|
function GetYield(A,Z){
|
||||||
let str = 'beamRate.py?A=' + A + '&Z=' + Z;
|
// let str = 'beamRate.py?A=' + A + '&Z=' + Z;
|
||||||
let client = new XMLHttpRequest();
|
// let client = new XMLHttpRequest();
|
||||||
client.onreadystatechange = function() {
|
// client.onreadystatechange = function() {
|
||||||
let haha = client.responseText.split(",");
|
// let haha = client.responseText.split(",");
|
||||||
yield = haha[0]
|
// yield = haha[0]
|
||||||
}
|
// }
|
||||||
client.open('GET', str, false);
|
// client.open('GET', str, false);
|
||||||
client.send();
|
// client.send();
|
||||||
|
// FRIB blocking the request....:(
|
||||||
}
|
}
|
||||||
|
|
||||||
function GetMassFromSym(AZ, id){
|
function GetMassFromSym(AZ, id){
|
||||||
|
@ -189,7 +190,7 @@ function GetMass(){
|
||||||
document.getElementById('heavySp').innerHTML = 'Sn: ' + heavy[4] + ' MeV, Sp: ' + heavy[5] + ' MeV, Sa : ' + heavy[6] + ' MeV';
|
document.getElementById('heavySp').innerHTML = 'Sn: ' + heavy[4] + ' MeV, Sp: ' + heavy[5] + ' MeV, Sa : ' + heavy[6] + ' MeV';
|
||||||
|
|
||||||
//document.getElementById('beamSp').innerHTML = "haah";
|
//document.getElementById('beamSp').innerHTML = "haah";
|
||||||
document.getElementById('beamYield').innerHTML = "FRIB ultimate yield : " + yield + " pps";
|
//document.getElementById('beamYield').innerHTML = "FRIB ultimate yield : " + yield + " pps";
|
||||||
//document.getElementById('n0').innerHTML = beam[0] + "," + beam[1] + "," + beam[2]
|
//document.getElementById('n0').innerHTML = beam[0] + "," + beam[1] + "," + beam[2]
|
||||||
//document.getElementById('n1').innerHTML = target[0] + "," + target[1] + "," + target[2]
|
//document.getElementById('n1').innerHTML = target[0] + "," + target[1] + "," + target[2]
|
||||||
//document.getElementById('n2').innerHTML = light[0] + "," + light[1] + "," + light[2]
|
//document.getElementById('n2').innerHTML = light[0] + "," + light[1] + "," + light[2]
|
||||||
|
|
|
@ -34,17 +34,28 @@ BField = form.getvalue('BField')
|
||||||
posArray = form.getvalue('posArray')
|
posArray = form.getvalue('posArray')
|
||||||
posRecoil = form.getvalue('posRecoil')
|
posRecoil = form.getvalue('posRecoil')
|
||||||
|
|
||||||
isDWBA = form.getvalue('DWBA');
|
isDWBA = form.getvalue('DWBA')
|
||||||
if isDWBA == "On" :
|
if isDWBA == "On" :
|
||||||
isDWBA = True
|
isDWBA = True
|
||||||
else:
|
else:
|
||||||
isDWBA = False
|
isDWBA = False
|
||||||
|
|
||||||
SSType = form.getvalue('SSType');
|
onlyDWBA = form.getvalue('onlyDWBA')
|
||||||
|
minAng = form.getvalue('minAng')
|
||||||
|
maxAng = form.getvalue('maxAng')
|
||||||
|
|
||||||
ExList = form.getvalue('Ex');
|
if onlyDWBA == "On" :
|
||||||
JpiList = form.getvalue('Jpi');
|
onlyDWBA = True
|
||||||
OrbList = form.getvalue('Orb');
|
isDWBA = True
|
||||||
|
else :
|
||||||
|
onlyDWBA = False
|
||||||
|
|
||||||
|
|
||||||
|
SSType = form.getvalue('SSType')
|
||||||
|
|
||||||
|
ExList = form.getvalue('Ex')
|
||||||
|
JpiList = form.getvalue('Jpi')
|
||||||
|
OrbList = form.getvalue('Orb')
|
||||||
|
|
||||||
op1 = form.getvalue('op1')
|
op1 = form.getvalue('op1')
|
||||||
op2 = form.getvalue('op2')
|
op2 = form.getvalue('op2')
|
||||||
|
@ -216,6 +227,9 @@ haha=""
|
||||||
|
|
||||||
if isDWBA :
|
if isDWBA :
|
||||||
|
|
||||||
|
if onlyDWBA :
|
||||||
|
dwba_1 = subprocess.run(["../Cleopatra/InFileCreator", fn4, minAng, maxAng, "0.1"] , stdout=subprocess.PIPE).stdout.decode('utf-8')
|
||||||
|
else :
|
||||||
dwba_1 = subprocess.run(["../Cleopatra/InFileCreator", fn4, "0", "180", "0.1"] , stdout=subprocess.PIPE).stdout.decode('utf-8')
|
dwba_1 = subprocess.run(["../Cleopatra/InFileCreator", fn4, "0", "180", "0.1"] , stdout=subprocess.PIPE).stdout.decode('utf-8')
|
||||||
cmd = "../Cleopatra/ptolemy <%s.in> %s.out" % (fn4, fn4)
|
cmd = "../Cleopatra/ptolemy <%s.in> %s.out" % (fn4, fn4)
|
||||||
outFile = fn4+ ".out"
|
outFile = fn4+ ".out"
|
||||||
|
@ -239,17 +253,18 @@ if isDWBA :
|
||||||
#if os.path.exists("transfer.root"):
|
#if os.path.exists("transfer.root"):
|
||||||
# os.remove("transfer.root");
|
# os.remove("transfer.root");
|
||||||
|
|
||||||
if isDWBA :
|
if onlyDWBA == False:
|
||||||
|
|
||||||
|
if isDWBA :
|
||||||
result = subprocess.run(["../Cleopatra/Transfer", fn1, fn2, dwbaExFile, dwbaRootFile, "transfer.root", "reaction.dat", "0"], stdout=subprocess.PIPE).stdout.decode('utf-8')
|
result = subprocess.run(["../Cleopatra/Transfer", fn1, fn2, dwbaExFile, dwbaRootFile, "transfer.root", "reaction.dat", "0"], stdout=subprocess.PIPE).stdout.decode('utf-8')
|
||||||
else:
|
else:
|
||||||
result = subprocess.run(["../Cleopatra/Transfer", fn1, fn2, fnEx, "", "transfer.root", "reaction.dat", "0"], stdout=subprocess.PIPE).stdout.decode('utf-8')
|
result = subprocess.run(["../Cleopatra/Transfer", fn1, fn2, fnEx, "", "transfer.root", "reaction.dat", "0"], stdout=subprocess.PIPE).stdout.decode('utf-8')
|
||||||
|
|
||||||
|
if fn5 =="":
|
||||||
if fn5 =="":
|
|
||||||
haha = subprocess.run(["../Cleopatra/PlotSimulation", "transfer.root"], stdout=subprocess.PIPE).stdout.decode('utf-8')
|
haha = subprocess.run(["../Cleopatra/PlotSimulation", "transfer.root"], stdout=subprocess.PIPE).stdout.decode('utf-8')
|
||||||
else:
|
else:
|
||||||
haha = subprocess.run(["../Cleopatra/PlotSimulation", "transfer.root", fn5], stdout=subprocess.PIPE).stdout.decode('utf-8')
|
haha = subprocess.run(["../Cleopatra/PlotSimulation", "transfer.root", fn5], stdout=subprocess.PIPE).stdout.decode('utf-8')
|
||||||
pngName=haha.splitlines().pop()
|
pngName=haha.splitlines().pop()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -310,6 +325,7 @@ if pngName != "" :
|
||||||
print ("<br> Download the <a href=\"files/%s\" download=\"%s\">Ex file</a>" % (fnEx, fnEx))
|
print ("<br> Download the <a href=\"files/%s\" download=\"%s\">Ex file</a>" % (fnEx, fnEx))
|
||||||
print ("<br> Download the simulation <a href=\"files/transfer.root\" download=\"transfer.root\">root file</a>")
|
print ("<br> Download the simulation <a href=\"files/transfer.root\" download=\"transfer.root\">root file</a>")
|
||||||
|
|
||||||
|
|
||||||
if fn5 != "" :
|
if fn5 != "" :
|
||||||
print ("<br> Downlaod the <a href=\"files/%s\" download=\"%s\">Plot Config file</a>" % (fn5, fn5))
|
print ("<br> Downlaod the <a href=\"files/%s\" download=\"%s\">Plot Config file</a>" % (fn5, fn5))
|
||||||
|
|
||||||
|
|
|
@ -76,21 +76,21 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h3>DWBA and E<sub>x</sub> List:</h3>
|
<h3>DWBA and E<sub>x</sub> List:</h3>
|
||||||
|
|
||||||
<p><b style="color:red;">For 2-nucleon transfer</b>, <b>Orbital</b> take the form NL=X, where N is number of node, X is momentum number. n and L are related by Σ<sub>i</sub> (2n<sub>i</sub>+l<sub>i</sub>) = 2N + X + 2n + l, where n<sub>i</sub> and l<sub>i</sub> are the principle number and orbital angular momentum of the each transfered nucleon, and n and l are the internal quanta of the 2-nucleon. e.g. (t,p) reaction to 0f orbtial, the left-hand side would be n<sub>i</sub> = 0 and l<sub>i</sub> = 3 and the sum is 3+3 = 6 = 2N + X + 2n+l. Assume n = l = 0, we have 6 = 2N+L. Thus, 3L=0, 2L=2,1L=4, 0L=6. </p>
|
<p><b style="color:red;">For 2-nucleon transfer</b>, <b>Orbital</b> take the form NL=X, where N is number of node, X is momentum number. n and L are related by Σ<sub>i</sub> (2n<sub>i</sub>+l<sub>i</sub>) = 2N + X + 2n + l, where n<sub>i</sub> and l<sub>i</sub> are the principle number and orbital angular momentum of the each transfered nucleon, and n and l are the internal quanta of the 2-nucleon. e.g. (t,p) reaction to 0f orbtial, the left-hand side would be n<sub>i</sub> = 0 and l<sub>i</sub> = 3 and the sum is 3+3 = 6 = 2N + X + 2n+l. Assume n = l = 0, we have 6 = 2N+L. Thus, 3L=0, 2L=2,1L=4, 0L=6. </p>
|
||||||
|
|
||||||
TODO: guess the orbital
|
TODO: guess the orbital
|
||||||
<br>
|
<br>
|
||||||
<input type="checkbox" id="pos" onclick="checkParity()" checked/>Positive parity</td>
|
<input type="checkbox" id="pos" onclick="checkParity()" checked/>Positive parity</td>
|
||||||
<input type="checkbox" id="neg" onclick="checkParity()" checked/>Negative parity</td>
|
<input type="checkbox" id="neg" onclick="checkParity()" checked/>Negative parity</td>
|
||||||
<input type="checkbox" id="unk" onclick="checkParity()" checked/>Unknown parity</td>
|
<input type="checkbox" id="unk" onclick="checkParity()" checked/>Unknown parity</td>
|
||||||
<br>
|
<br>
|
||||||
<button type="button" onclick="addStates()">Add known states</button>
|
<button type="button" onclick="addStates()">Add known states</button>
|
||||||
Isotope: <input type="text" id="AZ" size="5" value="17O"/>
|
Isotope: <input type="text" id="AZ" size="5" value="17O"/>
|
||||||
Max Ex: <input type="text" id="maxEx" size="5" value="5"/>MeV
|
Max Ex: <input type="text" id="maxEx" size="5" value="5"/>MeV
|
||||||
|
|
||||||
<p id='waiting'></p>
|
<p id='waiting'></p>
|
||||||
|
|
||||||
<table id="ExTable">
|
<table id="ExTable">
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -181,7 +181,19 @@ Max Ex: <input type="text" id="maxEx" size="5" value="5"/>MeV
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h3> Plot config:</h3>
|
<table>
|
||||||
|
<tr>
|
||||||
|
<input type="checkbox" name="onlyDWBA" value="On"/>Only DWBA and Don't Sim. Angle range (for only DWBA)
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Min [deg]: </td>
|
||||||
|
<td><input type = "text" name = "minAng" size="6" value="0" /></td>
|
||||||
|
<td>Max [deg]: </td>
|
||||||
|
<td><input type = "text" name = "maxAng" size="6" value="90"/></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h3> Plot config:</h3>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -207,10 +219,9 @@ Max Ex: <input type="text" id="maxEx" size="5" value="5"/>MeV
|
||||||
<input type="checkbox" name="gate" value="loop<=1" checked/>Loop = 1<br>
|
<input type="checkbox" name="gate" value="loop<=1" checked/>Loop = 1<br>
|
||||||
<input type="checkbox" name="gate" value="thetaCM>10" checked/> ThetaCM > 10 deg<br>
|
<input type="checkbox" name="gate" value="thetaCM>10" checked/> ThetaCM > 10 deg<br>
|
||||||
|
|
||||||
|
<p></p>
|
||||||
|
|
||||||
<p></p>
|
<input type = "submit" value = "Run DWBA and Simulation" style="width:200px;height:60px;" formtarget="_blank"/>
|
||||||
|
|
||||||
<input type = "submit" value = "Submit and Run Simulation" style="width:200px;height:60px;" formtarget="_blank"/>
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<hr style="height:4px;background-color:#F7CF3C; border-style:none; border-width:none">
|
<hr style="height:4px;background-color:#F7CF3C; border-style:none; border-width:none">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user