minor update
Browse files
efficiency_module/efficiency.py
CHANGED
|
@@ -1,12 +1,15 @@
|
|
| 1 |
import numpy as np
|
| 2 |
-
from flask import render_template, request
|
| 3 |
from . import blueprint
|
| 4 |
from functions import PlaneSheetAnalytical
|
| 5 |
|
| 6 |
# load the index page for the exposure module
|
| 7 |
-
@blueprint.route('/efficiency', methods=['GET'])
|
| 8 |
def efficiency():
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
|
| 12 |
# build the report page for the exposure module
|
|
|
|
| 1 |
import numpy as np
|
| 2 |
+
from flask import render_template, request, session
|
| 3 |
from . import blueprint
|
| 4 |
from functions import PlaneSheetAnalytical
|
| 5 |
|
| 6 |
# load the index page for the exposure module
|
| 7 |
+
@blueprint.route('/efficiency', methods=['GET', 'POST'])
|
| 8 |
def efficiency():
|
| 9 |
+
if request.method == "GET":
|
| 10 |
+
return render_template('efficiency_index.html')
|
| 11 |
+
else:
|
| 12 |
+
return 0
|
| 13 |
|
| 14 |
|
| 15 |
# build the report page for the exposure module
|
efficiency_module/templates/efficiency_index.html
CHANGED
|
@@ -22,7 +22,8 @@ table, th, td {
|
|
| 22 |
<br clear="all" />
|
| 23 |
|
| 24 |
<header>
|
| 25 |
-
<h1 style="text-align:center"><font color="#0070C0">CH</font>emical <font color="#0070C0">RIS</font>k calculator (CHRIS)
|
|
|
|
| 26 |
</header>
|
| 27 |
|
| 28 |
<script>
|
|
@@ -38,12 +39,19 @@ table, th, td {
|
|
| 38 |
$("#theTable tr:eq( 5 )").append("<td> <input type='number' step='any' value='1.0' min='0.00001' required id='time'" + i + "> </td>");
|
| 39 |
$("#theTable tr:eq( 6 )").append("<td> <input type='number' step='any' value='1e-8' min='1e-20' required id='D'" + i + "> </td>");
|
| 40 |
$("#theTable tr:eq( 7 )").append("<td> <input type='number' step='any' value='1.0' min='0.00001' required id='K'" + i + "> </td>");
|
|
|
|
| 41 |
|
| 42 |
};
|
| 43 |
|
| 44 |
function removeColumn(){
|
| 45 |
|
| 46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
};
|
| 49 |
</script>
|
|
@@ -52,8 +60,6 @@ table, th, td {
|
|
| 52 |
|
| 53 |
<form method="POST">
|
| 54 |
|
| 55 |
-
|
| 56 |
-
|
| 57 |
<input type = "button" onclick = "javascript:addColumn()" value = "Add column" />
|
| 58 |
<input type = "button" onclick = "javascript:removeColumn()" value = "Remove column" />
|
| 59 |
|
|
@@ -98,6 +104,11 @@ table, th, td {
|
|
| 98 |
<td> <input name="K1" id="K1" step="any" value="1" min="1e-3" type="number" required> </td>
|
| 99 |
<td> <input name="K2" id="K2" step="any" value="1" min="1e-3" type="number" required> </td>
|
| 100 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
</table>
|
| 102 |
|
| 103 |
<br> <button type="submit">Calculate</button>
|
|
|
|
| 22 |
<br clear="all" />
|
| 23 |
|
| 24 |
<header>
|
| 25 |
+
<h1 style="text-align:center"><font color="#0070C0">CH</font>emical <font color="#0070C0">RIS</font>k calculator (CHRIS)</h1>
|
| 26 |
+
<h2 style="text-align:center"> Extraction efficiency comparison RST </h2>
|
| 27 |
</header>
|
| 28 |
|
| 29 |
<script>
|
|
|
|
| 39 |
$("#theTable tr:eq( 5 )").append("<td> <input type='number' step='any' value='1.0' min='0.00001' required id='time'" + i + "> </td>");
|
| 40 |
$("#theTable tr:eq( 6 )").append("<td> <input type='number' step='any' value='1e-8' min='1e-20' required id='D'" + i + "> </td>");
|
| 41 |
$("#theTable tr:eq( 7 )").append("<td> <input type='number' step='any' value='1.0' min='0.00001' required id='K'" + i + "> </td>");
|
| 42 |
+
$("#theTable tr:eq( 8 )").append("<td> <input readonly id='release'" + i + "> </td>");
|
| 43 |
|
| 44 |
};
|
| 45 |
|
| 46 |
function removeColumn(){
|
| 47 |
|
| 48 |
+
var i = document.getElementById('theTable').rows[0].cells.length;
|
| 49 |
+
|
| 50 |
+
if (i == 2){
|
| 51 |
+
alert("At least one entry is required");
|
| 52 |
+
} else {
|
| 53 |
+
$('#theTable tr').find('td:last').remove();
|
| 54 |
+
}
|
| 55 |
|
| 56 |
};
|
| 57 |
</script>
|
|
|
|
| 60 |
|
| 61 |
<form method="POST">
|
| 62 |
|
|
|
|
|
|
|
| 63 |
<input type = "button" onclick = "javascript:addColumn()" value = "Add column" />
|
| 64 |
<input type = "button" onclick = "javascript:removeColumn()" value = "Remove column" />
|
| 65 |
|
|
|
|
| 104 |
<td> <input name="K1" id="K1" step="any" value="1" min="1e-3" type="number" required> </td>
|
| 105 |
<td> <input name="K2" id="K2" step="any" value="1" min="1e-3" type="number" required> </td>
|
| 106 |
</tr>
|
| 107 |
+
<tr>
|
| 108 |
+
<th> M/M0 </th>
|
| 109 |
+
<td> <input name="release1" id="release1" readonly> </td>
|
| 110 |
+
<td> <input name="release2" id="release2" readonly> </td>
|
| 111 |
+
</tr>
|
| 112 |
</table>
|
| 113 |
|
| 114 |
<br> <button type="submit">Calculate</button>
|