Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jan Zelenka
prasopes
Commits
089ddc0c
Commit
089ddc0c
authored
May 12, 2020
by
3Yan
Browse files
Reactivity support - code speedup
* Code is still WIP, but working much faster.
parent
b7fcf428
Changes
1
Hide whitespace changes
Inline
Side-by-side
prasopes/reactivitytools.py
View file @
089ddc0c
...
...
@@ -31,16 +31,23 @@ def pop_dial(augCanvas, drls, graph, labels):
names
,
times
,
intensities
=
drl
.
get_daughterset
(
augCanvas
.
ds
,
drls
)
if
len
(
names
)
<
2
:
return
params
=
augCanvas
.
ms
[
'params'
]
params
=
augCanvas
.
ms
[
'params'
][
1
]
parlen
=
len
(
params
)
pressures
=
[]
lastpos
=
0
for
time
in
times
:
toavg
=
[]
for
param
in
params
[
1
]:
if
param
[
0
]
==
time
:
toavg
.
append
(
param
[
36
])
for
i
in
range
(
lastpos
,
parlen
):
if
float
(
params
[
i
][
0
])
==
time
:
#toavg.append(param[36])
toavg
.
append
((
-
(
float
(
params
[
i
][
1
])
-
24.09
))
/
1000
)
lastpos
=
i
elif
float
(
params
[
i
][
0
])
>
time
:
break
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
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment