Commit e9a61830 authored by Tong Zhang's avatar Tong Zhang
Browse files

ENH: Support Twiss parameter display.

parent 54554110
...@@ -222,6 +222,12 @@ class MyAppWindow(BaseAppForm, Ui_MainWindow): ...@@ -222,6 +222,12 @@ class MyAppWindow(BaseAppForm, Ui_MainWindow):
xoy='y', xoy='y',
fill='m', fill='m',
anote=False) 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): def _plot_ellipse(self, figure_obj, params, **kws):
xoy = kws.get('xoy', 'x') xoy = kws.get('xoy', 'x')
...@@ -270,6 +276,11 @@ class MyAppWindow(BaseAppForm, Ui_MainWindow): ...@@ -270,6 +276,11 @@ class MyAppWindow(BaseAppForm, Ui_MainWindow):
self.last_bs = r[0][-1] self.last_bs = r[0][-1]
self.draw_ellipse() self.draw_ellipse()
def _show_results(self, data):
from .utils import ResultsModel
m = ResultsModel(self.twiss_results_treeView, data)
m.set_model()
@pyqtSlot() @pyqtSlot()
def on_query_quad_info(self): def on_query_quad_info(self):
"""Pop up dialog for selected quad for info query. """Pop up dialog for selected quad for info query.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment