iagapov / ocelot

Main repository moved to https://github.com/ocelot-collab/ocelot
GNU General Public License v3.0
8 stars 11 forks source link

updating transfer maps does not work #60

Closed iagapov closed 8 years ago

iagapov commented 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]

sergey-tomin commented 8 years ago

Fixed... but now we should be careful when two MagneticLattice objects generated from the one sequence.