added Sn Sp and Sa
This commit is contained in:
parent
b236aea862
commit
0128789b91
|
@ -19,57 +19,6 @@ def lc_read_csv(url):
|
|||
mp = 938.27208816; #MeV/c^2
|
||||
mn = 939.56542052;
|
||||
|
||||
'''
|
||||
haha = lc_read_csv(livechart + 'fields=ground_states&nuclides=all')
|
||||
def FindZ(AZ):
|
||||
query = livechart + "fields=ground_states&nuclides=" + AZ
|
||||
temp = lc_read_csv(query);
|
||||
try :
|
||||
return temp['z']
|
||||
except :
|
||||
return 'na'
|
||||
def FindSym(Z):
|
||||
try:
|
||||
return (haha['symbol'][haha['z']==Z]).iloc[0]
|
||||
except:
|
||||
return 'na'
|
||||
def Mass(A, Z):
|
||||
try :
|
||||
BEA = float(haha['binding'][haha['z']==Z][haha['n']==(A-Z)])/1000
|
||||
return (A-Z)*mn + Z*mp - A * BEA
|
||||
except :
|
||||
return -404
|
||||
def MassSym(AZ):
|
||||
query = livechart + "fields=ground_states&nuclides=" + AZ
|
||||
temp = lc_read_csv(query);
|
||||
Z = temp['z']
|
||||
N = temp['n']
|
||||
try :
|
||||
return Z*mp + N*mn - (Z+N)*temp['binding']/1000
|
||||
except:
|
||||
return -404
|
||||
def Sp(A,Z,a,z):
|
||||
mA = Mass(A,Z)
|
||||
mB = Mass(A-a, Z-z)
|
||||
if z == 0 :
|
||||
mb = a * mn
|
||||
elif a == z :
|
||||
mb = a * mp
|
||||
else :
|
||||
mb = Mass(a,z)
|
||||
if (mB == -404 or mb == -404 or mA == -404) :
|
||||
return -404
|
||||
else:
|
||||
return mB + mb - mA
|
||||
|
||||
def Ex(AZ, maxMeV):
|
||||
query = livechart + "fields=levels&nuclides=" + AZ
|
||||
tempEx = lc_read_csv(query);
|
||||
try :
|
||||
return tempEx[['energy', 'jp']][tempEx['energy']<= maxMeV * 1000]
|
||||
except:
|
||||
return -404
|
||||
'''
|
||||
#===================================================
|
||||
import cgi, cgitb
|
||||
|
||||
|
@ -95,7 +44,7 @@ try :
|
|||
N = temp['n'][0]
|
||||
mass = Z*mp + N*mn - (Z+N)*temp['binding']/1000
|
||||
halfLife = temp['half_life_sec'][0]
|
||||
|
||||
|
||||
print("<br> A : %3d, Z : %3d, N : %3d" % (Z+N, Z, N))
|
||||
print("<br> Jpi : %3s" % (temp['jp'][0]))
|
||||
if halfLife != " " :
|
||||
|
@ -103,10 +52,7 @@ try :
|
|||
print("<br> Mass : %.4f MeV" % (mass))
|
||||
print("<br> Binding : %.4f MeV/A" % (temp['binding']/1000))
|
||||
print("<br> Binding : %.4f MeV" % (temp['binding']/1000*(Z+N)))
|
||||
#print("<br>Sn : %8.3f MeV, Sp : %8.3f MeV" % (Sp(Z+N,Z, 1, 0), Sp(Z+N,Z, 1, 1)))
|
||||
#print("<br>S2n : %8.3f MeV, S2p : %8.3f MeV, Sd : %8.3f MeV" % (Sp(Z+N,Z, 2, 0), Sp(Z+N,Z, 2, 2), Sp(Z+N, Z, 2, 1)))
|
||||
#print("<br>S3n : %8.3f MeV, S3p : %8.3f MeV, St : %8.3f MeV, S(3He) : %8.3f MeV" % (Sp(Z+N,Z, 3, 0), Sp(Z+N,Z, 3, 3), Sp(Z+N, Z, 3, 1), Sp(Z+N, Z, 3, 2)))
|
||||
#print("<br>S4n : %8.3f MeV, S4p : %8.3f MeV, Sa : %8.3f MeV" % (Sp(Z+N,Z, 4, 0), Sp(Z+N,Z, 4, 4), Sp(Z+N, Z, 4, 2)))
|
||||
|
||||
#print(" magnetic dipole : " + temp['magnetic_dipole'][0] + " mu.N")
|
||||
#print("electric quadruple : " + temp['electric_quadrupole'][0] + " barn")
|
||||
#if halfLife > 0 :
|
||||
|
@ -117,6 +63,17 @@ try :
|
|||
except :
|
||||
print("<br>No such Isotopes.")
|
||||
|
||||
|
||||
import os, subprocess
|
||||
os.chdir(r"files")
|
||||
|
||||
result=subprocess.run(['../Cleopatra/Isotope', AZ], stdout=subprocess.PIPE).stdout.decode('utf-8')
|
||||
p1 = result.find('S1n:')
|
||||
print("<br>" + result[p1:p1+13])
|
||||
p1 = result.find('S1p')
|
||||
print("<br>" + result[p1:p1+13])
|
||||
p1 = result.find('S(4He)')
|
||||
print("<br>" + result[p1:p1+16])
|
||||
print("<br>=============================")
|
||||
|
||||
if float(maxEx) > 0 :
|
||||
|
@ -136,8 +93,8 @@ if float(maxEx) > 0 :
|
|||
print("</table>")
|
||||
except:
|
||||
print("<br> cannot find Ex data")
|
||||
|
||||
|
||||
|
||||
|
||||
print("</body>")
|
||||
print("</html>")
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<td><input type = "text" name = "beam_A" size="5" value="16"/></td>
|
||||
<td style="text-align:right">Z:</td>
|
||||
<td><input type = "text" name = "beam_Z" size="5" value="8"/></td>
|
||||
<td style="text-align:right">J-pi</td>
|
||||
<td style="text-align:right">J<sup>π</sup></td>
|
||||
<td><input type = "text" name = "beam_Jpi" size="5" value="0+"/><td>
|
||||
<td style="text-align:right">Ex:</td>
|
||||
<td><input type = "text" name = "beam_Ex" size="5" value="0.00"/></td>
|
||||
|
@ -76,16 +76,12 @@
|
|||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>DWBA and Ex List:</h3>
|
||||
|
||||
<input type="checkbox" name="DWBA" value="On"/>Cal. DWBA
|
||||
<h3>DWBA and E<sub>x</sub> List:</h3>
|
||||
|
||||
<p></p>
|
||||
|
||||
<table id="ExTable">
|
||||
<tr>
|
||||
<td> Ex [MeV]</td>
|
||||
<td> J-pi</td>
|
||||
<td> E<sub>x</sub> [MeV]</td>
|
||||
<td> J<sup>π</sup></td>
|
||||
<td> Orbital </td>
|
||||
</tr>
|
||||
</tr>
|
||||
|
@ -101,6 +97,7 @@
|
|||
</table>
|
||||
|
||||
<p></p>
|
||||
<input type="checkbox" name="DWBA" value="On"/>Cal. DWBA
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
|
@ -160,13 +157,47 @@
|
|||
<input type = "submit" value = "Submit and Run Simulation" style="width:200px;height:60px;" />
|
||||
</form>
|
||||
|
||||
<h3> Simple kinematic Calculations (Experimental..) </h3>
|
||||
|
||||
<button type="button">Calculate</button>
|
||||
|
||||
<table id="XTable">
|
||||
<tr>
|
||||
<td>E<sub>x</sub>[MeV]</td>
|
||||
<td>θ<sub>CM</sub>[deg]</td>
|
||||
<td>E<sub>b</sub>[MeV]</td>
|
||||
<td>Z<sub>b0</sub>[mm]</td>
|
||||
<td>Z<sub>b</sub>[mm]</td>
|
||||
<td>2*ρ<sub>b</sub>[mm]</td>
|
||||
<td>θLab<sub>bM</sub>[deg]</td>
|
||||
<td>T<sub>b</sub>[ns]</td>
|
||||
<td>E<sub>B</sub>[MeV]</td>
|
||||
<td>θLab<sub>B</sub>[deg]</td>
|
||||
<td>Z<sub>B0</sub>/2[mm]</td>
|
||||
<td>2*ρ<sub>B</sub>[mm]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.00</td>
|
||||
<td><input type="text" value="20" size="7" id="th1"/></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script>
|
||||
function addRow() {
|
||||
var table = document.getElementById("ExTable");
|
||||
var nRow = table.rows.length;
|
||||
var row = table.insertRow(nRow-1);
|
||||
row.innerHTML = '<td><input type="text" name="Ex" size="5"/></td> \
|
||||
row.innerHTML = '<td><input type="text" name="Ex" size="5" /></td> \
|
||||
<td><input type="text" name="Jpi" size="5"/></td> \
|
||||
<td><input type="text" name="Orb" size="5"/></td>';
|
||||
}
|
||||
|
@ -178,6 +209,9 @@ function deleteRow(){
|
|||
table.deleteRow(nRow-2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user