Skip to content

Commit 37c4a86

Browse files
authored
Merge pull request #2 from sterbini/master
Adding the non optics dependent macros
2 parents 0f434d1 + 172fb5f commit 37c4a86

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

optics_indep_macros.madx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
!From L.Deniau https://github.com/MethodicalAcceleratorDesign/MAD-X/issues/883
2+
copytable(source, target) : macro = {
3+
copytable.__i = 1 ;
4+
copytable.__n = table(source, tablelength) ;
5+
while ( copytable.__i <= copytable.__n ) {
6+
setvars, table = source, row = copytable.__i ;
7+
fill, table = target, row = copytable.__i ;
8+
copytable.__i = copytable.__i + 1 ;
9+
}
10+
}
11+
12+
!From L.Deniau https://github.com/MethodicalAcceleratorDesign/MAD-X/issues/883
13+
clonesumm(target) : macro = {
14+
create, table = target, column = {
15+
"length", "orbit5", "alfa", "gammatr", "q1",
16+
"dq1", "betxmax", "dxmax", "dxrms", "xcomax",
17+
"xcorms", "q2", "dq2", "betymax", "dymax",
18+
"dyrms", "ycomax", "ycorms", "deltap",
19+
"synch_1","synch_2","synch_3","synch_4","synch_5",
20+
"nflips"
21+
} ;
22+
exec, copytable(summ, target) ;
23+
}

0 commit comments

Comments
 (0)