Commit 8fa44a8b authored by 3Yan's avatar 3Yan

Exception handling routine fixed, reactivitytools improved

* reactivity now follows the color scheme of drl table
* exception now summons an error window with traceback
parent a359752a
......@@ -13,7 +13,7 @@ from . import zcetools_help
from . import reactivitytools
__version__ = "0.0.21"
__version__ = "0.0.22"
__all__ = ['config', 'datatools', 'docks', 'drltools', 'drltoos_gui', 'filetools',
......
......@@ -47,7 +47,8 @@ class QStatusBarLogger(logging.Handler):
def show_exception_and_exit(exc_type, exc_value, tb):
import traceback
traceback.print_exception(exc_type, exc_value, tb)
raw_input("Press key to exit.")
errmsg = "\n".join(traceback.format_exception(exc_type, exc_value, tb))
QtWidgets.QMessageBox.critical(None, "Exception!", errmsg)
sys.exit(-1)
......
......@@ -40,6 +40,8 @@ def pop_dial(augCanvas, drls, graph, labels, parselect, coef1, coef2):
graph.clear()
gt.pop_plot([0], [0], graph, labels)
names, times, intensities = drl.get_daughterset(augCanvas.ds, drls)
colorargs = [row for row in range(drls['dt'].rowCount())
if drls['dt'].cellWidget(row, 0).checkState() == 2]
if len(names) < 2:
return
params = augCanvas.ms['params'][1]
......@@ -71,8 +73,9 @@ def pop_dial(augCanvas, drls, graph, labels, parselect, coef1, coef2):
relint = np.divide(intensities[i], np.clip(np.sum(
intensities, 0), np.finfo(np.float32).eps, None),
dtype=np.float64)
graph.plot(np.asarray(pressures).T[1], relint[goodtimes], label=names[i],
color=(gt.colors[i % len(gt.colors)] / 255), marker=".",
graph.plot(np.asarray(pressures).T[1], relint[goodtimes],
label=names[i], color=(gt.colors[
colorargs[i] % len(gt.colors)] / 255), marker=".",
markersize=2, linestyle="None")
graph.autoscale(True)
graph.figure.canvas.draw()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment