Initial test of matching
This commit is contained in:
26
plot.py
26
plot.py
@@ -40,6 +40,8 @@ class OpticsPlot(QtWidgets.QMainWindow, Ui_OpticsPlotGUI):
|
||||
self.PEtay.toggled.connect(self.doplot)
|
||||
self.PMux.toggled.connect(self.doplot)
|
||||
self.PMuy.toggled.connect(self.doplot)
|
||||
self.PX.toggled.connect(self.doplot)
|
||||
self.PY.toggled.connect(self.doplot)
|
||||
self.PR56.toggled.connect(self.doplot)
|
||||
self.PEnergy.toggled.connect(self.doplot)
|
||||
self.PStart.editingFinished.connect(self.doplot)
|
||||
@@ -159,6 +161,8 @@ class OpticsPlot(QtWidgets.QMainWindow, Ui_OpticsPlotGUI):
|
||||
filt['Energy']=self.PEnergy.isChecked()
|
||||
filt['MUX'] = self.PMux.isChecked()
|
||||
filt['MUY'] = self.PMuy.isChecked()
|
||||
filt['X'] = self.PX.isChecked()
|
||||
filt['Y'] = self.PY.isChecked()
|
||||
|
||||
s = self.twiss.s
|
||||
i1 = np.argmin(np.abs(s - z0))
|
||||
@@ -187,9 +191,17 @@ class OpticsPlot(QtWidgets.QMainWindow, Ui_OpticsPlotGUI):
|
||||
self.plotSingle(s[i1:i2], self.twiss.dy[i1:i2], (1, 0, 0, 1), r'$\eta_{y}$')
|
||||
ylabel = ylabel + r'$\eta_y$ (m), '
|
||||
if filt['MUX']:
|
||||
self.plotSingle(s[i1:i2], self.twiss.mux[i1:i2], (0, 0.5, 1, 1), r'$\mu_{y}$')
|
||||
self.plotSingle(s[i1:i2], self.twiss.mux[i1:i2], (0, 0.5, 1, 1), r'$\mu_{x}$')
|
||||
ylabel = ylabel + r'$\mu_x$, '
|
||||
if filt['MUY']:
|
||||
self.plotSingle(s[i1:i2], self.twiss.muy[i1:i2], (1, 0.5, 0, 1), r'$\mu_{y}$')
|
||||
ylabel = ylabel + r'$\mu_y$, '
|
||||
if filt['X']:
|
||||
self.plotSingle(s[i1:i2], self.twiss.x[i1:i2], (0, 0.5, 1, 1), r'$x$')
|
||||
ylabel = ylabel + r'$x$ (m), '
|
||||
if filt['Y']:
|
||||
self.plotSingle(s[i1:i2], self.twiss.y[i1:i2], (1, 0.5, 0, 1), r'$y$')
|
||||
ylabel = ylabel + r'$y$ (m), '
|
||||
if filt['RE56']:
|
||||
self.plotSingle(s[i1:i2], self.twiss.re56[i1:i2], (0, 0, 0, 1), r'$R_{56}$')
|
||||
ylabel = ylabel + r'$R_{56}$ (m), '
|
||||
@@ -220,6 +232,18 @@ class OpticsPlot(QtWidgets.QMainWindow, Ui_OpticsPlotGUI):
|
||||
if filt['DY']:
|
||||
self.plotSingle(s[i1:i2], self.twissref.dy[i1:i2], (1, 0, 0, 1), r'$\eta_{y}$',dashed=True)
|
||||
ylabel = ylabel + r'$\eta_y$ (m), '
|
||||
if filt['MUX']:
|
||||
self.plotSingle(s[i1:i2], self.twiss.mux[i1:i2], (0, 0.5, 1, 1), r'$\mu_{x}$',dashed=True)
|
||||
ylabel = ylabel + r'$\mu_x$, '
|
||||
if filt['MUY']:
|
||||
self.plotSingle(s[i1:i2], self.twiss.muy[i1:i2], (1, 0.5, 0, 1), r'$\mu_{y}$',dashed=True)
|
||||
ylabel = ylabel + r'$\mu_y$, '
|
||||
if filt['X']:
|
||||
self.plotSingle(s[i1:i2], self.twiss.x[i1:i2], (0, 0.5, 1, 1), r'$x$',dashed=True)
|
||||
ylabel = ylabel + r'$x$ (m), '
|
||||
if filt['Y']:
|
||||
self.plotSingle(s[i1:i2], self.twiss.y[i1:i2], (1, 0.5, 0, 1), r'$y$',dashed=True)
|
||||
ylabel = ylabel + r'$y$ (m), '
|
||||
if filt['RE56']:
|
||||
self.plotSingle(s[i1:i2], self.twissref.re56[i1:i2], (0, 0, 0, 1), r'$R_{56}$',dashed=True)
|
||||
ylabel = ylabel + r'$R_{56}$ (m), '
|
||||
|
||||
Reference in New Issue
Block a user