Closed iagapov closed 8 years ago
from ocelot import * import ocelot
ocelot.logger.show_debug = True q1 = Quadrupole(l=0.1, k1=10) d = Drift(l=10)
beam = Beam() beam.beta_x = 10 beam.beta_y = 10 beam.alpha_x = 10 beam.alpha_y = 10
lat = MagneticLattice( (d,q1,d))
tws = twiss(lat, Twiss(beam))
print tws[-1] q1.k1 = 0.0 lat.update_transfer_maps()
tws = twiss(lat, Twiss(beam)) print tws[-1]
Fixed... but now we should be careful when two MagneticLattice objects generated from the one sequence.
from ocelot import * import ocelot
ocelot.logger.show_debug = True q1 = Quadrupole(l=0.1, k1=10) d = Drift(l=10)
beam = Beam() beam.beta_x = 10 beam.beta_y = 10 beam.alpha_x = 10 beam.alpha_y = 10
lat = MagneticLattice( (d,q1,d))
tws = twiss(lat, Twiss(beam))
print tws[-1] q1.k1 = 0.0 lat.update_transfer_maps()
tws = twiss(lat, Twiss(beam)) print tws[-1]