Ready for release

This commit is contained in:
2025-06-26 14:15:38 +02:00
parent e208227deb
commit 2071e353b8
5 changed files with 150 additions and 140 deletions

24
plot.py
View File

@@ -217,40 +217,40 @@ class OpticsPlot(QtWidgets.QMainWindow, Ui_OpticsPlotGUI):
if not self.twissref is None:
if filt['BETX']:
self.plotSingle(s[i1:i2], self.twissref.betx[i1:i2], (0, 0, 1, 1), r'$\beta_{x}$',dashed=True)
self.plotSingle(s[i1:i2], self.twissref.betx[i1:i2], (0, 0, 1, 1), r'$\beta_{x}$ (ref)',dashed=True)
ylabel = ylabel + r'$\beta_x$ (m), '
if filt['BETY']:
self.plotSingle(s[i1:i2], self.twissref.bety[i1:i2], (1, 0, 0, 1), r'$\beta_{y}$',dashed=True)
self.plotSingle(s[i1:i2], self.twissref.bety[i1:i2], (1, 0, 0, 1), r'$\beta_{y}$ (ref)',dashed=True)
ylabel = ylabel + r'$\beta_y$ (m), '
if filt['ALFX']:
self.plotSingle(s[i1:i2], self.twissref.alfx[i1:i2], (0, 0, 1, 1), r'$\alpha_{x}$',dashed=True)
self.plotSingle(s[i1:i2], self.twissref.alfx[i1:i2], (0, 0, 1, 1), r'$\alpha_{x}$ (ref)',dashed=True)
ylabel = ylabel + r'$\alpha_x$ (rad), '
if filt['ALFY']:
self.plotSingle(s[i1:i2], self.twissref.alfy[i1:i2], (1, 0, 0, 1), r'$\alpha_{y}$',dashed=True)
self.plotSingle(s[i1:i2], self.twissref.alfy[i1:i2], (1, 0, 0, 1), r'$\alpha_{y}$ (ref)',dashed=True)
ylabel = ylabel + r'$\alpha_y$ (rad), '
if filt['DX']:
self.plotSingle(s[i1:i2], self.twissref.dx[i1:i2], (0, 0, 1, 1), r'$\eta_{x}$',dashed=True)
self.plotSingle(s[i1:i2], self.twissref.dx[i1:i2], (0, 0, 1, 1), r'$\eta_{x}$ (ref)',dashed=True)
ylabel = ylabel + r'$\eta_x$ (m), '
if filt['DY']:
self.plotSingle(s[i1:i2], self.twissref.dy[i1:i2], (1, 0, 0, 1), r'$\eta_{y}$',dashed=True)
self.plotSingle(s[i1:i2], self.twissref.dy[i1:i2], (1, 0, 0, 1), r'$\eta_{y}$ (ref)',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)
self.plotSingle(s[i1:i2], self.twiss.mux[i1:i2], (0, 0.5, 1, 1), r'$\mu_{x}$ (ref)',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)
self.plotSingle(s[i1:i2], self.twiss.muy[i1:i2], (1, 0.5, 0, 1), r'$\mu_{y}$ (ref)',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)
self.plotSingle(s[i1:i2], self.twiss.x[i1:i2], (0, 0.5, 1, 1), r'$x$ (ref)',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)
self.plotSingle(s[i1:i2], self.twiss.y[i1:i2], (1, 0.5, 0, 1), r'$y$ (ref)',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)
self.plotSingle(s[i1:i2], self.twissref.re56[i1:i2], (0, 0, 0, 1), r'$R_{56}$ (ref)',dashed=True)
ylabel = ylabel + r'$R_{56}$ (m), '
if filt['Energy']:
self.plotSingle(s[i1:i2], self.energyref[i1:i2], (0, 1, 0, 1), r'$E$',dashed=True)
self.plotSingle(s[i1:i2], self.energyref[i1:i2], (0, 1, 0, 1), r'$E$ (ref)',dashed=True)
ylabel = ylabel + r'$E$ (MeV), '
self.axes.legend(bbox_to_anchor=(0.15, 0.85))