diff --git a/examples/twiss/000d_twiss_ele_co_search.py b/examples/twiss/000d_twiss_ele_co_search.py index 6867c5eff..9d9931a4f 100644 --- a/examples/twiss/000d_twiss_ele_co_search.py +++ b/examples/twiss/000d_twiss_ele_co_search.py @@ -16,19 +16,17 @@ collider.lhcb2.twiss_default['method'] = '4d' collider.lhcb2.twiss_default['reverse'] = True -line = collider.lhcb2 -line_name = 'lhcb2' - -line = collider.lhcb1 -line_name = 'lhcb1' - -two = line.twiss(ele_start='ip7', ele_stop='ip3', ele_init='ip1', - betx=.15, bety=.15) +collider.vars['on_x1vs'] = 123 +collider.vars['on_sep1h'] = 2 +collider.vars['on_x1vs'] = 200 +collider.vars['on_sep1v'] = -3 +# tw = collider.lhcb1.twiss() # Fails on closed orbit search +tw = collider.lhcb1.twiss(ele_co_search='ip7') # Successful closed orbit search import matplotlib.pyplot as plt plt.close('all') plt.figure(1) -plt.plot(two.s, two.betx, label='betx') -plt.plot(two.s, two.bety, label='bety') +plt.plot(tw.s, tw.x) +plt.plot(tw.s, tw.y) plt.show() \ No newline at end of file