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
51a63d62
Commit
51a63d62
authored
Aug 16, 2019
by
Yan
Browse files
Minor fix of DRL
parent
d777f9bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
prasopes/drltools.py
View file @
51a63d62
...
...
@@ -72,7 +72,7 @@ def update_profile(pt, row, dataset):
xmin
,
xmax
=
limits
[
widest
][
0
]
xex
=
max
((
xmax
-
xmin
)
*
0.25
,
0.20
)
spectrum
.
set_xlim
(
xmin
-
xex
,
xmax
+
xex
)
ymax
=
max
([
lim
[
1
]
for
lim
in
limits
],
1
)
ymax
=
max
(
*
[
lim
[
1
]
for
lim
in
limits
],
1
)
spectrum
.
set_ylim
(
ymax
*-
0.1
,
ymax
*
1.2
)
spectrum
.
figure
.
canvas
.
draw
()
...
...
@@ -521,11 +521,11 @@ def export_drlspectrum(parent, fn, ds, drls):
save_drlconfig
(
drls
,
parent
,
exp_f_name
[
2
])
def
print_graph
(
labels
,
ds
,
drls
):
def
print_graph
(
ds
,
drls
):
printfig
=
Figure
(
figsize
=
(
5
,
2
),
dpi
=
100
)
printplot
=
printfig
.
add_subplot
(
111
)
printcanvas
=
FigureCanvas
(
printfig
)
gt
.
pop_plot
(
printplot
,
labels
)
gt
.
pop_plot
(
0
,
0
,
printplot
,
drls
[
'graph
labels
'
]
)
update_drlspectrum
(
ds
,
drls
,
printplot
)
widget
=
QtWidgets
.
QDialog
(
None
,
windowTitle
=
'Print preview'
)
layout
=
QtWidgets
.
QVBoxLayout
(
widget
)
...
...
@@ -725,8 +725,7 @@ def main_window(parent, ds, filename, cache, update_signal):
main_widget
,
ds
,
drls
,
chromplot
))
drl_save
.
clicked
.
connect
(
lambda
:
save_drlconfig
(
drls
,
main_widget
))
drl_print
.
clicked
.
connect
(
lambda
:
print_graph
(
graphlabels
,
ds
,
drls
))
drl_print
.
clicked
.
connect
(
lambda
:
print_graph
(
ds
,
drls
))
drl_export
.
clicked
.
connect
(
lambda
:
export_drlspectrum
(
main_widget
,
filename
,
ds
,
drls
))
...
...
Write
Preview
Supports
Markdown
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