impactx icon indicating copy to clipboard operation
impactx copied to clipboard

Add Total Bunch Attributes to Monitor

Open ax3l opened this issue 1 year ago • 2 comments

Add our reduced beam characteristics (moments of the particle bunch) as metadata to openPMD files (the beam monitor element).

X-Ref.:

  • #533

Action Items

  • [x] implement
  • [x] test that reduced_beam_characteristics is indeed an AllReduce now.
  • [x] document changes in reduced beam characteristics (no ref particle info anymore)
  • [x] document openPMD attributes

Follow-ups

  • [ ] document openPMD particle "columns" if read back to a dataframe @ax3l
  • [ ] test and use the new metadata from openPMD over the text file in tests (only visualize_ml_....py?) @ax3l @RTSandberg

ax3l avatar Apr 18 '24 17:04 ax3l

Will push one more update on the TODOs we marked in the RBC routines - removing reference particle info from it to avoid duplication and collisions.

ax3l avatar Apr 24 '24 18:04 ax3l

ping @RTSandberg @n01r for review :)

ax3l avatar May 17 '24 15:05 ax3l

The reference particle data is still written to "ref_particle_," but is no longer duplicated in "reduced_beam_characteristics_".

Correct. The issue was that it would otherwise collide in names once we combine it to the openPMD output. If we want, we can still keep the information in the text file output.

Instead, it is duplicated in the openPMD output.

It should now only be once in the openPMD output using a consistent name for reference particle and collective beam properties; stored as attributes to the beam in each step (iteration).

ax3l avatar May 20 '24 19:05 ax3l

I think it's important that we keep the reference particle text output. It is a small cost for I/O, and allows a quick check by the user without any postprocessing.

Good point. We have currently in diags/ the

  • ref_particle*
  • reduced_beam_characteristics*

In the latter, this would remove s and ref_beta_gamma now. Shall I add s again (or both?). (Later, we could also make both one file for simplicity.)

ax3l avatar May 22 '24 19:05 ax3l

I think it's good to remove ref_beta_gamma from reduced_beam_characteristics, since that information is duplicated in the ref_particle text output, and it is a "reference" quantity. However, it would be good to keep the s output in both text files, since this is effectively the independent variable characterizing the lattice location.

cemitch99 avatar May 22 '24 19:05 cemitch99

Perfect, ok that is what I thought, too. I added the s column back to the text file now :)

ax3l avatar May 22 '24 19:05 ax3l