plotting phase space separately in each pass

Moderators: cyao, michael_borland

Post Reply
gpark
Posts: 18
Joined: 07 Dec 2017, 13:15

plotting phase space separately in each pass

Post by gpark » 28 Oct 2019, 09:53

I have a simulation setting where the beam goes through the lattice 11 times by setting n_passes=11 (physically corresponding to the beam circulating the lattice 11 times). I also setup watch points. Now I want to have separate plots of phase space (t-p, etc) at watch point W1 in each turn. With the command I know, which is sddsplot W1.sdds -col=t,p -graph=dot, I only obtain the plot with all of 11 turns overlapped. Could you let me know how?

Thanks
Gunn

michael_borland
Posts: 1933
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: plotting phase space separately in each pass

Post by michael_borland » 20 Nov 2019, 16:10

Gunn,

Each pass of the beam is put into a separate "page" in the output file. By default, sddsplot treats all the pages as a single set of data.

Plot all the data together:

Code: Select all

sddsplot W1.sdds -col=t,p -graph=dot
Split the data pages, but plot the data together with different color:

Code: Select all

sddsplot W1.sdds -col=t,p -split=page -graph=dot,vary -legend=param=Pass
Split the data pages and show them on different plot pages:

Code: Select all

sddsplot W1.sdds -col=t,p -split=page -separate=page -title=@Pass -graph=dot
It is sometimes more useful to use "dt" instead of "t" in these plots, since it doesn't increase with each pass. Also, you might want to plot the fractional energy deviation and keep fixed scales

Code: Select all

sddsplot W1.sdds -col=dt,p -split=page -separate=page -samescales -title=@Pass -graph=dot -factor=yparam=pCentral,yinvert -offset=yparam=pCentral,yinvert -ylabel=delta
--Michael

Post Reply