color coding particles and tracking

Moderators: cyao, michael_borland

Post Reply
jtobin
Posts: 47
Joined: 23 Jul 2008, 15:00

color coding particles and tracking

Post by jtobin » 31 May 2012, 10:44

Dear Michael,
How can I color code certain portion of the beam and track them with their color? My goal is the following: I want to split the bunch as "head"-red (33%), middle-white(33%), "tail"-green(33%) and I want to send the bunch through a bunch compressor and see how CSR affects each part of the beam as a function of initial color. I read other posts in the forum discussing color, but most of them are for display rather than tracking. Am I mixing things up?

regards,
Charles

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

Re: color coding particles and tracking

Post by michael_borland » 23 Jul 2012, 20:29

Charles,

Sorry, I just saw this in going through some old posts.

This can be done by combining data files from the start and end of the tracking. Suppose that beam.in is your input file (either created by bunched_beam or by you and used with sdds_beam) and beam.out is the output file.

% sddsxref beam.in beam.out beam.both -take=* -edit=col,*,ei/0/
% sddsplot -order=spect -column=t,p -graph=dot,vary -split=column=t0 beam.both

This will color all particles according to the original value of time (t0). For fewer color bands, try setting the width in -split.

% sddsplot -order=spect -column=t,p -graph=dot,vary -split=column=t0,width=1e-12 beam.both

--Michael

Post Reply