Page 1 of 1

Extracting particleID coordinates

Posted: 11 Jan 2012, 15:37
by Max
Dear Michael and collaborators,
I am running Elegant with the space charge option. I was wondering about the best way to pick a particle in a bunch in order to fft it to compute its incoherent tune shift. Is there a clever way to do it ?
I notice that the element WATCH has a "fft" mode. What does it do ?
Thanks, Max

Re: Extracting particleID coordinates

Posted: 11 Jan 2012, 18:18
by michael_borland
Max,

The WATCH FFT mode won't do what you want, since it works on the centroid coordinates only. You'll need to dump the particle coordinates using WATCH in "coord" mode.

Following that, this command should do it (although I confess I didn't try it):

sddsprocess data.sdds -pipe=out -filter=col,particleID,1,1 | sddsexpand -pipe | sddscollapse -pipe | sddsfft -pipe=in fft.sdds -column=Pass,x

This will pick out particle 1 and FFT the x values.

The expand | collapse trick is a way to convert all the parameters into columns, assuming you have only one row per page in the initial file.

--Michael

Re: Extracting particleID coordinates

Posted: 12 Jan 2012, 20:40
by Max
Thank you, Michael,
your suggestion works well.

Cheers, Max