Commit 089ddc0c authored by 3Yan's avatar 3Yan
Browse files

Reactivity support - code speedup

* Code is still WIP, but working much faster.
parent b7fcf428
......@@ -31,16 +31,23 @@ def pop_dial(augCanvas, drls, graph, labels):
names, times, intensities = drl.get_daughterset(augCanvas.ds, drls)
if len(names) < 2:
params =['params']
params =['params'][1]
parlen = len(params)
pressures = []
lastpos = 0
for time in times:
toavg = []
for param in params[1]:
if param[0] == time:
for i in range(lastpos,parlen):
if float(params[i][0]) == time:
lastpos = i
elif float(params[i][0]) > time:
if len(toavg) != 0:
pressures.append([time, np.average(toavg)])
goodtimes = np.where([t in np.asarray(pressures).T[0] for t in times])
nptpressures = np.asarray(pressures).T[0]
goodtimes = np.where([t in nptpressures for t in times])
for i in range(1,len(intensities)):
relint = np.divide(intensities[i], np.clip(np.sum(
intensities, 0), np.finfo(np.float32).eps, None),
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