Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify that ReducedBeamCharacteristics are relative to reference particle #585

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions docs/source/dataanalysis/dataanalysis.rst
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You changed the wording from 'beam momentum' / 'beam position' etc to 'particle momentum'. Is there a particular reason for it? The section title is 'beam characteristic'. I am confused :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was me, sorry. I did this because the word "beam" usually implies a collective property, like "beam energy" or "beam size". At this point in the documentation, we are referring to the individual particle position and momentum. (Of course, after the reduced diagnostics are computed, those are properties of the beam--hence the section title.) Is that too confusing?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine! :)

Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,12 @@ Example to print the integrated orbit path length ``s`` at each beam monitor pos
Reduced Beam Characteristics
----------------------------

ImpactX calculates reduced beam characteristics like averaged positions, momenta, beam emittances and Courant-Snyder (Twiss) parameters during runtime.
These quantities are calculated before, after, and during each step of the simulation.
ImpactX calculates reduced beam characteristics based on the beam moments during runtime.
These include averaged positions, momenta, beam emittances and Courant-Snyder (Twiss) parameters.
For computing beam moments (as elsewhere), positions and momenta are given as deviations with respect to the reference particle (see :ref:`Coordinates and Units <theory-coordinates-and-units>`).

The reduced beam characteristics are stored with the output of the beam monitor element.
They are also calculated before, after, and during each step of the simulation.
If ``diag.slice_step_diagnostics`` is enabled, they will also be calculated during each slice of each beamline element.

The code writes out the values in an ASCII file prefixed ``reduced_beam_characteristics`` containing the follow columns:
Expand All @@ -69,13 +73,13 @@ The code writes out the values in an ASCII file prefixed ``reduced_beam_characte
* ``s``, ``ref_beta_gamma``
Reference particle coordinate ``s`` (unit: meter) and relativistic momentum normalized by the particle mass and the speed of light (unit: dimensionless)
* ``x_mean/min/max``, ``y_mean/min/max``, ``t_mean/min/max``
Average / minimum / maximum beam particle position in the dimensions of ``x``, ``y`` (transverse coordinates, unit: meter), and ``t`` (normalized time difference :math:`ct`, unit: meter)
Average / minimum / maximum particle displacement with respect to the reference particle in the dimensions of ``x``, ``y`` (transverse coordinates, unit: meter), and ``t`` (normalized time difference :math:`ct`, unit: meter)
* ``sig_x``, ``sig_y``, ``sig_t``
RMS of the average beam particle positions (unit: meter)
* ``px_mean/min/max``, ``py_mean/min/max``, ``pt_mean/min/max``
Average / minimum / maximum beam momenta normalized by reference particle momentum (unit: dimensionless, radians for transverse momenta)
Average / minimum / maximum particle momentum deviation from the reference particle momentum, divided by the magnitude of the reference particle momentum (unit: dimensionless, radians for transverse momenta)
* ``sig_px``, ``sig_py``, ``sig_pt``
RMS of the average beam momenta (energy difference for ``pt``) (unit: dimensionless)
Standard deviation of the particle momentum deviations (energy difference for ``pt``) normalized by the magnitude of the reference particle momentum (unit: dimensionless)
* ``emittance_x``, ``emittance_y``, ``emittance_t``
Normalized beam emittance (unit: meter)
* ``alpha_x``, ``alpha_y``, ``alpha_t``
Expand Down
1 change: 1 addition & 0 deletions docs/source/theory/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ One can set the number of slice steps through each lattice element for the appli
Currently, space charge kicks are calculated in 3D.
A 2D space-charge solver for purely transversal effects will be added in the future.

.. _theory-coordinates-and-units:

Coordinates and Units
---------------------
Expand Down
Loading