#compLattice.appendElement(fQ) #compLattice.appendElement(compDrift) #compLattice.appendElement(dQ) #compLattice.appendElement(compDrift) # #compLattice.appendElement(fQ) #compLattice.appendElement(compDrift) #compLattice.appendElement(dQ) #compLattice.appendElement(compDrift) print compLattice.printLattice() #saveLattice("../data/" + "savedlatticestringsextudipolecavity" + ".npy", compLattice) ## Calculate partresInComp, envresInComp, twissresInComp = compLattice.evaluate(multipartfromold,envelopeInComp,twissfromold) # Does eval still change input? yes #saveSummer2015Format("../data/" + "outpartFODSOspaceChargetesttest" + ".txt","../data/" + "outtwiss" + ".txt",partresInComp, twissfromold) plotEverything(multipartfromold, twissfromold, partresInComp) ### Plotting print "Plotting..." #twissin = np.array([0.0, 10.3338028723, 1e-06, -3.331460652e-16, 8.85901414121, 1e-06, -3.331460652e-16, 8.85901414121, 1e-06]) #twissout = twissin #envelopein = np.array([1, 0, 0, 1, 0, 0, 1, 0, 0]) #envelopeout = envelopein # #nbrOfParticlestest = 100 # #multipartin = gaussianTwiss3D(nbrOfParticlestest, twissout)