Page 1 of 1

saving trajectory associated with macroparticle(s)

Posted: 16 Jun 2020, 05:45
by Philippe Piot
Hello,
Is there a way in ELEGANT to save the trajectory of a few macroparticles associated with a bunch while tracking the entire bunch? Thank you, -- Philippe.

Re: saving trajectory associated with macroparticle(s)

Posted: 30 Jun 2020, 09:32
by michael_borland
Philippe,

Unfortunately, no. The best I can suggest is the following
  1. Add WATCH elements after all locations of interest. The insert_elements command can help with that.
  2. Use the START_PID and END_PID parameters on the WATCH elements to limit the output to a few interesting particles. This requires that the particles of interest have their particle IDs within a range that excludes all other particles.
  3. Postprocess to create a file for each particle of interest.
The attached script may help.

--Michael

Re: saving trajectory associated with macroparticle(s)

Posted: 01 Jul 2020, 23:11
by Philippe Piot
Michael,
Thank you very much for the suggestion. All the best, -- Philippe.