Skip to content

Commit 96ebf21

Browse files
committed
Clean up example
1 parent bbdaefa commit 96ebf21

File tree

2 files changed

+1944
-1966
lines changed

2 files changed

+1944
-1966
lines changed

examples/lhc_native_loader_and_py_lattice/002_inspect_py_lattice.py

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,28 +23,6 @@
2323
tt1 = env.lhcb1.get_table()
2424
print(f'{tt1.rows["mb.a8r1.b1"].s=}')
2525

26-
27-
2826
tt2 = env.lhcb2.get_table()
2927
tw1 = env.lhcb1.twiss4d()
30-
tw2 = env.lhcb2.twiss4d(reverse=True)
31-
32-
t1 = time.time()
33-
env2 = xt.load('lhc_composers.json')
34-
t2 = time.time()
35-
print(f'Time to load LHC from json: {t2-t1:.3f} s')
36-
37-
env2.lhcb1.particle_ref = xt.Particles(p0c=0.45e12)
38-
env2.lhcb2.particle_ref = xt.Particles(p0c=0.45e12)
39-
40-
tt1_ref = env2.lhcb1.get_table()
41-
tt2_ref = env2.lhcb2.get_table()
42-
tw1_ref = env2.lhcb1.twiss4d()
43-
tw2_ref = env2.lhcb2.twiss4d(reverse=True)
44-
45-
tt1_nodr = tt1.rows[tt1.element_type != 'Drift']
46-
tt1_ref_nodr = tt1_ref.rows[tt1_ref.element_type != 'Drift']
47-
48-
for ii, cc in enumerate(env.lhcb1.composer.components):
49-
if cc.name == 'mb.a8r1.b1':
50-
break
28+
tw2 = env.lhcb2.twiss4d(reverse=True)

0 commit comments

Comments
 (0)