Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zhang, Tong
Online Model App
Commits
e9a61830
Commit
e9a61830
authored
Jul 27, 2021
by
Tong Zhang
Browse files
ENH: Support Twiss parameter display.
parent
54554110
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/myApp/app.py
View file @
e9a61830
...
...
@@ -222,6 +222,12 @@ class MyAppWindow(BaseAppForm, Ui_MainWindow):
xoy
=
'y'
,
fill
=
'm'
,
anote
=
False
)
#
params
=
{
k
:
v
for
k
,
v
in
params_x
.
items
()}
params
.
update
(
params_y
)
data
=
[(
k
,
v
,
'-'
)
for
k
,
v
in
params
.
items
()]
self
.
_show_results
(
data
)
def
_plot_ellipse
(
self
,
figure_obj
,
params
,
**
kws
):
xoy
=
kws
.
get
(
'xoy'
,
'x'
)
...
...
@@ -270,6 +276,11 @@ class MyAppWindow(BaseAppForm, Ui_MainWindow):
self
.
last_bs
=
r
[
0
][
-
1
]
self
.
draw_ellipse
()
def
_show_results
(
self
,
data
):
from
.utils
import
ResultsModel
m
=
ResultsModel
(
self
.
twiss_results_treeView
,
data
)
m
.
set_model
()
@
pyqtSlot
()
def
on_query_quad_info
(
self
):
"""Pop up dialog for selected quad for info query.
...
...
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