Skip to content
Snippets Groups Projects
Commit 2f2c5497 authored by zhang's avatar zhang
Browse files

24/02/2011

1)  In Printlatt( ),user can define the file name to save twiss parameters.
parent cf215089
No related branches found
No related tags found
No related merge requests found
......@@ -80,8 +80,15 @@ int main(int argc, char *argv[]) {
//assign user defined command
strcpy(CommandStr,UserCommand[i]);
//print the twiss paramters in a file defined by the name
if(strcmp(CommandStr,"PrintTwissFlag") == 0) {
cout << "\n";
cout << "print the twiss parameters to file: "<< twiss_file << "\n";
printlatt(twiss_file);
}
//turn on flag for quadrupole fringe field
if(strcmp(CommandStr,"QuadFringeOnFlag") == 0) {
else if(strcmp(CommandStr,"QuadFringeOnFlag") == 0) {
globval.quad_fringe = true;
cout << "\n";
cout << "globval.quad_fringe is " << globval.quad_fringe << "\n";
......@@ -222,7 +229,7 @@ int main(int argc, char *argv[]) {
// if (CouplingFlag == true) {
else if(strcmp(CommandStr,"CouplingFlag") == 0) {
Ring_GetTwiss(chroma = true, 0.0); /* Compute and get Twiss parameters */
printlatt(); /* dump linear lattice functions into "linlat.dat" */
printlatt("linlat_coupling.out"); /* dump linear lattice functions into "linlat.dat" */
// GetEmittance(ElemIndex("cav"), true); //only for test
Coupling_Edwards_Teng();
Ring_GetTwiss(chroma = true, 0.0); /* Compute and get Twiss parameters */
......@@ -236,7 +243,7 @@ int main(int argc, char *argv[]) {
SetErr(err_seed, err_rms);
prtmfile("flat_file_errcoupling_full.dat"); //print the elements with rotation errors
Ring_GetTwiss(chroma = true, 0.0); /* Compute and get Twiss parameters */
printlatt(); /* dump linear lattice functions into "linlat.dat" */
printlatt("linlat_errcoupling.out"); /* dump linear lattice functions into "linlat.dat" */
Coupling_Edwards_Teng();
// GetEmittance(ElemIndex("cav"), true); //only for test
Ring_GetTwiss(chroma = true, 0.0); /* Compute and get Twiss parameters */
......@@ -251,7 +258,7 @@ int main(int argc, char *argv[]) {
SetErr2(err_seed, err_rms);
prtmfile("flat_file_errcoupling_half.dat"); //print the elements with rotation errors
Ring_GetTwiss(chroma = true, 0.0); /* Compute and get Twiss parameters */
printlatt(); /* dump linear lattice functions into "linlat.dat" */
printlatt("linlat_errcoupling2.out"); /* dump linear lattice functions into "linlat.dat" */
Coupling_Edwards_Teng();
// GetEmittance(ElemIndex("cav"), true);
Ring_GetTwiss(chroma = true, 0.0); /* Compute and get Twiss parameters */
......@@ -376,7 +383,7 @@ int main(int argc, char *argv[]) {
for (int ii = 0; ii <= 40; ii++) {
dP = -0.02 + 0.001 * ii;
Ring_GetTwiss(chroma = false, dP); /* Compute and get Twiss parameters */
printlatt(); /* dump linear lattice functions into "linlat.dat" */
printlatt("linlat_eta.out"); /* dump linear lattice functions into "linlat.dat" */
getcod(dP, lastpos);
// printcod();
prt_cod("cod.out", globval.bpm, true);
......
......@@ -217,7 +217,7 @@ void Read_Lattice(char *fic)
}
}
/* SOLEIL print out lattice functions, with all the optical information for the lattice with design values */
printlatt();
printlatt("linlat.out");
printglob();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment