diff --git a/activation/calculator_main.js b/activation/calculator_main.js index 051c59b..eefa5e7 100644 --- a/activation/calculator_main.js +++ b/activation/calculator_main.js @@ -240,7 +240,7 @@ function activation_table(act, cutoff) { } content += '\n'; if (some_unusual) { - content += ' b reaction activity is slightly underestimated; it does not include decay of transients after removal from beam.\n'; + content += ' b reactions are transitory products; activity will increase during parent burn up.\n'; } content += ' \n\n'; return content; @@ -294,7 +294,9 @@ function process_response(ldata) { } // Decay time - if (act.decay_time > 0) { + if (act.decay_time === null) { + content += '
Failed to calculate decay time. Please report sample and activation parameters to paul.kienzle@nist.gov.\n'; + } else if (act.decay_time > 0) { content += '
Time to decay below '+act.decay_level.toExponential(4)+' μCi is '+format_time(act.decay_time)+'.\n'; } content += '

\n' diff --git a/activation/index_template.html b/activation/index_template.html index bc3df84..f5da5ec 100644 --- a/activation/index_template.html +++ b/activation/index_template.html @@ -328,9 +328,9 @@

Thermal flux

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.

Calculation parameters are controlled by URL:

diff --git a/cgi-bin/nact.py b/cgi-bin/nact.py index d529695..37c381d 100755 --- a/cgi-bin/nact.py +++ b/cgi-bin/nact.py @@ -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():