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
5acb10b1
Commit
5acb10b1
authored
Jul 16, 2020
by
Yan
Browse files
DRLtools - copy spectrum works
* added ctrl+c for DRL spectrum
parent
59ba6394
Changes
4
Hide whitespace changes
Inline
Side-by-side
prasopes/__init__.py
View file @
5acb10b1
...
...
@@ -13,7 +13,7 @@ from . import zcetools_help
from
.
import
reactivitytools
__version__
=
"0.0.3
2
"
__version__
=
"0.0.3
3
"
__all__
=
[
'config'
,
'datatools'
,
'docks'
,
'drltools'
,
'drltoos_gui'
,
'filetools'
,
...
...
prasopes/config.py
View file @
5acb10b1
...
...
@@ -30,6 +30,9 @@ def settings():
(
"imggen/zcespec_xinch"
,
5
),
(
"imggen/zcespec_yinch"
,
2
),
(
"imggen/zcespec_dpi"
,
300
),
(
"imggen/drlspec_xinch"
,
10
),
(
"imggen/drlspec_yinch"
,
4
),
(
"imggen/drlspec_dpi"
,
300
),
(
"imggen/reactspecspec_xinch"
,
3.5
),
(
"imggen/reactspecspec_yinch"
,
2
),
(
"imggen/reactspecspec_dpi"
,
300
),
...
...
prasopes/drltools_gui.py
View file @
5acb10b1
...
...
@@ -14,6 +14,7 @@ import prasopes.filetools as ft
import
prasopes.config
as
cf
import
prasopes.reactivitytools
as
rt
import
prasopes.drltools
as
drl
import
prasopes.imagetools
as
imgt
import
os.path
import
logging
matplotlib
.
use
(
"Qt5Agg"
)
...
...
@@ -486,6 +487,12 @@ def paste_clip(ds, drls, drlspectrum):
and
i
<
table
.
rowCount
():
table
.
item
(
i
,
j
).
setText
(
col
)
def
paint_override
(
self
,
ds
,
drls
,
drlspectrum
):
update_drlspectrum
(
ds
,
drls
,
self
.
plot
)
self
.
plot
.
set_xlim
(
drlspectrum
.
get_xlim
())
self
.
plot
.
set_ylim
(
drlspectrum
.
get_ylim
())
self
.
plot
.
figure
.
canvas
.
draw
()
def
key_pressed
(
event
,
ds
,
drls
,
drlspectrum
):
if
event
.
key
()
==
QtCore
.
Qt
.
Key_Delete
:
...
...
@@ -498,7 +505,13 @@ def key_pressed(event, ds, drls, drlspectrum):
update_profile
(
drls
[
'pt'
],
row
,
ds
)
if
event
.
key
()
==
QtCore
.
Qt
.
Key_C
\
and
event
.
modifiers
().
__int__
()
==
QtCore
.
Qt
.
ControlModifier
:
clip_range
(
drls
)
if
drls
[
'dt'
].
underMouse
()
or
drls
[
'pt'
].
underMouse
():
clip_range
(
drls
)
else
:
imggen
=
imgt
.
ImagePainter
(
"drlspec"
)
imggen
.
popfig
=
lambda
:
paint_override
(
imggen
,
ds
,
drls
,
drlspectrum
)
imggen
.
clip
()
if
event
.
key
()
==
QtCore
.
Qt
.
Key_V
\
and
event
.
modifiers
().
__int__
()
==
QtCore
.
Qt
.
ControlModifier
:
paste_clip
(
ds
,
drls
,
drlspectrum
)
...
...
prasopes/reactivitytools.py
View file @
5acb10b1
...
...
@@ -63,6 +63,12 @@ class reactivityParam(QtWidgets.QHBoxLayout):
self
.
addWidget
(
self
.
dial
,
stretch
=
1
)
def
paint_override
(
self
,
augCanvas
,
drls
,
grph
,
labels
,
parselect
):
pop_dial
(
augCanvas
,
drls
,
self
.
plot
,
labels
,
parselect
)
self
.
plot
.
set_xlim
(
grph
.
get_xlim
())
self
.
plot
.
set_ylim
(
grph
.
get_ylim
())
def
key_pressed
(
event
,
augCanvas
,
drls
,
grph
,
labels
,
parselect
):
if
event
.
key
()
==
QtCore
.
Qt
.
Key_C
:
if
event
.
modifiers
().
__int__
()
==
QtCore
.
Qt
.
ControlModifier
:
...
...
@@ -106,12 +112,6 @@ def update_parselect(augCanvas, parselect):
parselect
.
setCurrentIndex
(
index
)
def
paint_override
(
self
,
augCanvas
,
drls
,
grph
,
labels
,
parselect
):
pop_dial
(
augCanvas
,
drls
,
self
.
plot
,
labels
,
parselect
)
self
.
plot
.
set_xlim
(
grph
.
get_xlim
())
self
.
plot
.
set_ylim
(
grph
.
get_ylim
())
def
pop_dial
(
augCanvas
,
drls
,
graph
,
labels
,
parselect
):
logger
.
debug
(
"populating reactivity dialog"
)
# Do not do anything when data set is not populated
...
...
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