Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions activation/calculator_main.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ function activation_table(act, cutoff) {
}
content += '</tr>\n';
if (some_unusual) {
content += ' <tr class="activity_unusual"><td colspan="9">b reaction activity is slightly underestimated; it does not include decay of transients after removal from beam.</td></tr>\n';
content += ' <tr class="activity_unusual"><td colspan="9">b reactions are transitory products; activity will increase during parent burn up.</td></tr>\n';
}
content += ' </tfoot> \n</table>\n';
return content;
Expand Down Expand Up @@ -294,7 +294,9 @@ function process_response(ldata) {
}

// Decay time
if (act.decay_time > 0) {
if (act.decay_time === null) {
content += '<br><span style="color:red">Failed to calculate decay time. Please report sample and activation parameters to paul.kienzle@nist.gov.</span>\n';
} else if (act.decay_time > 0) {
content += '<br>Time to decay below '+act.decay_level.toExponential(4)+' &mu;Ci is '+format_time(act.decay_time)+'.\n';
}
content += '</p>\n'
Expand Down
6 changes: 3 additions & 3 deletions activation/index_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,9 @@ <h3>Thermal flux</h3>
Reaction = b : This is the beta produced daughter of an activated parent.
This is calculated only for the cases where the daughter is long lived
relative to the parent. The calculated activity is through the end of
exposure only. Contributions from the added decay of the parent after the
end of irradiation are left for the user to determine, but are usually
negligible for irradiations that are long relative to the parent halflife.
exposure only. Contributions from the decay of the parent after the end of
irradiation are accumulated in the daughter, leading to an increase in daughter
activity until the parent burn-up is complete.
</p>

<p>Calculation parameters are controlled by URL:</p>
Expand Down
11 changes: 10 additions & 1 deletion cgi-bin/nact.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,16 @@ def api_call(form: dict):
exposure=exposure,
rest_times=rest_times,
abundance=abundance)
decay_time = sample.decay_time(decay_level)
try:
decay_time = sample.decay_time(decay_level)
except Exception:
# TODO: could return the error message rather than None
# TODO: what does pyodide do with logging and print statements?
# decay time calculator should always succeed, but the
# new algorithm might be unstable. Let the routine
# raise an error but don't shove it in the face of the
# user quite yet.
decay_time = None
total = [0]*len(sample.rest_times)
rows = []
for el, activity_el in sample.activity.items():
Expand Down