Support for offset and dispersion in initial beam distributions#984
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
ax3l
left a comment
There was a problem hiding this comment.
This looks great!
I will apply a small patch in docs and then it can go in. There is a general issue with named args in the Python docs that we need to fix, but it is not related to this PR per se.
| .. autofunction:: impactx.twiss | ||
|
|
||
| .. py:class:: impactx.distribution.Gaussian(lambdax, lambday, lambdat, lambdapx, lambdapy, lambdapt, muxpx=0.0, muypy=0.0, mutpt=0.0) | ||
| .. py:class:: impactx.distribution.Gaussian(lambdax, lambday, lambdat, lambdapx, lambdapy, lambdapt, muxpx=0.0, muypy=0.0, mutpt=0.0, meanx=0.0, meany=0.0, meant=0.0, meanpx=0.0, meanpy=0.0, meanpt=0.0, dispx=0.0, disppx=0.0, dispy=0.0, disppy=0.0) |
There was a problem hiding this comment.
I think the spelling of all those parameters in src/python/distribution.cpp (even before this PR) is actually case sensitive and has some uppercase letters, but we can fix that separately of this PR (and we try to automate the pick-up eventually via PRs like #699 )
ax3l
left a comment
There was a problem hiding this comment.
Implementation LGTM!
I think when we do the follow-up, we could rename a few parameters/variables to use _ between components for easier readability, e.g., m_meanpx as m_mean_px, etc.
This PR adds support for the following features:
meanx = 0.1, with corresponding inputs for all six phase space coordinates(x,pt),(px,pt),(y,pt), or(py,pt), allowing the generation of a beam that is matched to a region with nonzero dispersionThis closes Issues #922 and #970 .