Skip to content

Commit

Permalink
Merge pull request #2 from sterbini/master
Browse files Browse the repository at this point in the history
Adding the non optics dependent macros
  • Loading branch information
giadarol authored Mar 24, 2020
2 parents 0f434d1 + 172fb5f commit 37c4a86
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions optics_indep_macros.madx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
!From L.Deniau https://github.com/MethodicalAcceleratorDesign/MAD-X/issues/883
copytable(source, target) : macro = {
copytable.__i = 1 ;
copytable.__n = table(source, tablelength) ;
while ( copytable.__i <= copytable.__n ) {
setvars, table = source, row = copytable.__i ;
fill, table = target, row = copytable.__i ;
copytable.__i = copytable.__i + 1 ;
}
}

!From L.Deniau https://github.com/MethodicalAcceleratorDesign/MAD-X/issues/883
clonesumm(target) : macro = {
create, table = target, column = {
"length", "orbit5", "alfa", "gammatr", "q1",
"dq1", "betxmax", "dxmax", "dxrms", "xcomax",
"xcorms", "q2", "dq2", "betymax", "dymax",
"dyrms", "ycomax", "ycorms", "deltap",
"synch_1","synch_2","synch_3","synch_4","synch_5",
"nflips"
} ;
exec, copytable(summ, target) ;
}

0 comments on commit 37c4a86

Please sign in to comment.