Skip to content
GitLab
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
22051abf
Commit
22051abf
authored
Jun 26, 2020
by
3Yan
Browse files
BugFix - running program without spectra without crushing
* removed bug from the last commit - annotation routine wont fail
parent
8eb00652
Changes
2
Hide whitespace changes
Inline
Side-by-side
prasopes/__init__.py
View file @
22051abf
...
...
@@ -13,7 +13,7 @@ from . import zcetools_help
from
.
import
reactivitytools
__version__
=
"0.0.3
1
"
__version__
=
"0.0.3
2
"
__all__
=
[
'config'
,
'datatools'
,
'docks'
,
'drltools'
,
'drltoos_gui'
,
'filetools'
,
...
...
prasopes/graphtools.py
View file @
22051abf
...
...
@@ -379,11 +379,6 @@ def ann_spec(ms_spec, msdata, ann_limit=0.01):
peakline
=
np
.
empty
([
len
(
maxargs
)],
dtype
=
[(
'x'
,
np
.
float32
),
(
'y'
,
np
.
float32
)])
peakline
[
'x'
],
peakline
[
'y'
]
=
xdata
[
maxargs
],
ydata
[
maxargs
]
peaks
.
append
(
peakline
)
peaks
=
np
.
concatenate
(
peaks
)
s_peaks
=
sub_peaks
(
peaks
,
msdata
[
'texts'
],
np
.
diff
(
ms_spec
.
get_xlim
()),
np
.
diff
(
ms_spec
.
get_ylim
()))
# delete objects from the spectra
for
intensity
in
msdata
[
'annotation'
]:
...
...
@@ -391,6 +386,14 @@ def ann_spec(ms_spec, msdata, ann_limit=0.01):
# remove them from tracking
msdata
[
'annotation'
].
clear
()
if
len
(
peaks
)
==
0
:
return
peaks
=
np
.
concatenate
(
peaks
)
s_peaks
=
sub_peaks
(
peaks
,
msdata
[
'texts'
],
np
.
diff
(
ms_spec
.
get_xlim
()),
np
.
diff
(
ms_spec
.
get_ylim
()))
dispints
=
cf
.
settings
().
value
(
"view/intensities"
,
type
=
bool
)
for
peak
in
s_peaks
:
annotation
=
'{0:.2f}
\n
{1: .2e}'
.
format
(
peak
[
0
],
peak
[
1
])
\
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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