Page 1 of 1

output of the phase space coordinates at mutiple locations

Posted: 20 Jun 2019, 09:07
by Xiaozhong
One can get the final phase space coordinates in Elegant in the "%s.out". Maybe sometimes one needs to inspect the phase space evolutions in tracking. Is it possible to get the phase space coordinates in the intermediate locations of tracking? Thanks.

Re: output of the phase space coordinates at mutiple locations

Posted: 21 Jun 2019, 10:29
by michael_borland
Yes, you can do this by inserting WATCH elements into the beamline. The insert_elements command can help with this if you want many such elements.

E.g., to put a WATCH element at every quadrupole, try
&insert_elements
name=*, type=*QUAD*,
element_def = "WQ: WATCH,FILENAME=%s-%03ld.wq,mode=coordinate"
&end

Of course, having many of these may generate a lot of data and make the simulation run more slowly.

--Michael