Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
TRACY3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PA
Optics
TRACY3
Commits
2f2c5497
Commit
2f2c5497
authored
14 years ago
by
zhang
Browse files
Options
Downloads
Patches
Plain Diff
24/02/2011
1) In Printlatt( ),user can define the file name to save twiss parameters.
parent
cf215089
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tracy/tools/soltracy.cc
+12
-5
12 additions, 5 deletions
tracy/tools/soltracy.cc
tracy/tracy/src/soleilcommon.cc
+1
-1
1 addition, 1 deletion
tracy/tracy/src/soleilcommon.cc
with
13 additions
and
6 deletions
tracy/tools/soltracy.cc
+
12
−
5
View file @
2f2c5497
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
tracy/tracy/src/soleilcommon.cc
+
1
−
1
View file @
2f2c5497
...
...
@@ -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
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment