Skip to content

Conversation

ax3l
Copy link
Member

@ax3l ax3l commented Aug 15, 2025

Proposing a few breaking changes for distributions for clarity, ease of use and potential change in defaults

Checklist

Simplify usage & pick-up in dashboard.
Straight forwarding of mean and dispersion parameters.
@ax3l ax3l requested a review from cemitch99 August 15, 2025 20:54
@ax3l ax3l added changes input scripts / defaults Changes the syntax or meaning of input scripts and/or defaults component: distributions beam distributions labels Aug 15, 2025
Comment on lines +70 to +71
//AMREX_ALWAYS_ASSERT_WITH_MESSAGE(nslice > 0,
// pp_element.getPrefix() + ".nslice must be > 0.");
Copy link
Member Author

Choose a reason for hiding this comment

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

This change should not be included

- use consistent spelling of argument names
- spell out abbrevations
@ax3l ax3l force-pushed the topic-rename-distr-args-default branch from 532593e to 24a974e Compare August 15, 2025 20:58
* @param meanx,meany,meant offsets of the mean (centroid) positions from those of the reference particle
* @param meanpx,meanpy,meanpt offsets of the mean (centroid) momenta from those of the reference particle
* @param dispx,disppx,dispy,disppy dispersion and its derivative in horizontal and vertical directions
* @param lambda_x,lambda_y,lambda_t phase space axis intercepts (position);
Copy link
Member Author

Choose a reason for hiding this comment

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

Yay, this worked well with Cursor AI: I changed one distribution and told it to do the same change in the other 7 distributions 🎉

py::arg("meanPx")=0.0, py::arg("meanPy")=0.0, py::arg("meanPt")=0.0,
py::arg("dispX")=0.0, py::arg("dispPx")=0.0,
py::arg("dispY")=0.0, py::arg("dispPy")=0.0,
py::arg("lambda_x"), py::arg("lambda_y"), py::arg("lambda_t"),
Copy link
Member Author

Choose a reason for hiding this comment

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

Could keep this file unchanged to avoid user breakage.

alpha_x=1.3385830279518021,
alpha_y=-1.3479109197361046,
alpha_t=92.624347459169869,
dispX=-0.26669723385388505,
Copy link
Member Author

Choose a reason for hiding this comment

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

Small break, just introduced in #1099

Suggested change
dispX=-0.26669723385388505,
dispersion_x=-0.26669723385388505,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changes input scripts / defaults Changes the syntax or meaning of input scripts and/or defaults component: distributions beam distributions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant