particle (longitudinal) coordinates

Moderators: cyao, michael_borland

Post Reply
tennant
Posts: 85
Joined: 31 Jul 2008, 07:19
Location: Jefferson Laboratory

particle (longitudinal) coordinates

Post by tennant » 31 Jul 2008, 07:30

Hi,

In simulating our machine I use several "watch" elements along the linac. Often I am most interested in the longitudinal dynamics and like to see how the bunch evolves through the linac. What is often frustrating is the running time coordinate which makes it difficult to compare bunch lengths from two different locations (what makes it worse is that in order to keep the number of significant digits, the output from sddsplot has a tiny, tiny font for the time axis labels). The only way I've found around this is rather messy and time consuming. I output a centroid file, grab the "Cs" at the location of the "watch" element, then subtract this value, etc...

Any way to do this more cleanly?

Thanks,
chris

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

Re: particle (longitudinal) coordinates

Post by michael_borland » 31 Jul 2008, 08:01

Chris,

The quickest way to handle this is using the offset mode of sddsplot.

sddsplot <listOfFilenames> -graph=dot -separate -mode=x=meanCenter -column=t,p

This will compute the mean value of t for each page, then offset the coordinates by the negative of that value. Assuming all the rf systems are phased to the mean arrival time (usually true), this will give you just what you want.

A better plot is obtained by using the pCentral parameter in the watch point files to plot delta instead of p:

sddsplot <listOfFilenames> -graph=dot -separate -mode=x=meanCenter -offset=yparameter=pCentral,yinvert \
-factor=yparameter=pCentral,yinvert -ylabel="delta" -column=t,p

(The combination of the factor and offset options gives (p-pCentral)/pCentral.)

Another option is to use the "s" coordinate parameter that is in the watch point file:
sddscombine <listOfFilenames> -pipe=out \
| sddsprocess -pipe=in file1.sdds \
"-define=parameter,tRef,s c_mks /,units=s" \
"-redefine=column,dt,t tRef - ,units=s"

sddsplot file1.sdds -graph=dot -separate=page -split=page -column=dt,p

The problem here is that I have to assume v=c, which might not be true for all cases.

It occurs to me that there is no real reason I can't put the fiducial particle time in the watch point file as a parameter. I'll look into doing this, which should make matters easier in this regard.

Thanks for the question!

--Michael

tennant
Posts: 85
Joined: 31 Jul 2008, 07:19
Location: Jefferson Laboratory

Re: particle (longitudinal) coordinates

Post by tennant » 31 Jul 2008, 09:00

Hi Michael,

Thanks for your quick reply and help. I've tried your first suggestion and it seems to be exactly what I need. However, I believe the correct command include "-mode=x=meanCenter" rather than "-mode=x=meanoffset".

Thanks again,
chris

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

Re: particle (longitudinal) coordinates

Post by michael_borland » 31 Jul 2008, 09:02

Chris,

You're right about meanCenter. I edited the post.

--Michael

Post Reply