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

Change distribution default parameters to Twiss in dashboard #748

Conversation

proy30
Copy link
Contributor

@proy30 proy30 commented Oct 20, 2024

This PR updates the primary option for beam distribution configurations to "Twiss". The previously primary set, "Native," has been renamed to "Quadratic Form" and is now available as an alternative parameterization for users.

In addition, this PR makes minor adjustments to the code structure and docstrings within the beam distribution section. These changes do not affect functionality.

Tested with this example to ensure correct functionality.

Checklist

  • Set "Twiss" as the default, with "Quadratic Form" as the alternative option.
  • Update dashboard functionality to correctly display twiss and to read through simulation
  • Update export templates to correctly handle the "Twiss" parameterization.
  • Ensure the "Thermal" distribution uses only a single set of parameters.

I noticed that all beta/emitt parameters must have non-zero values, but this validation is missing in the current PR. PR #690 includes a modified helper function with built-in validation capabilities for non-zero values. Better to either include beta/emitt validation in that PR or in a new one once #690 is merged.

Resolves #724

@proy30 proy30 self-assigned this Oct 20, 2024
@proy30 proy30 added component: dashboard our browser based trame dashboard changes input scripts / defaults Changes the syntax or meaning of input scripts and/or defaults labels Oct 20, 2024
@proy30
Copy link
Contributor Author

proy30 commented Oct 20, 2024

@EZoni
Copy link
Member

EZoni commented Oct 23, 2024

As far as the AppleClang CI check is concerned, we probably need to rebase after #750 is merged.

Copy link
Member

@cemitch99 cemitch99 left a comment

Choose a reason for hiding this comment

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

This is great! The main feature missing is the display of units for the distribution inputs. For example, beta_x, beta_y, beta_t, and emittance_x, emittance_y, emittance_t all have units of meters (m), while alpha_x, alpha_y, alpha_t are unitless.

Twiss is now default, 'Native' changed to 'Quadratic Form' and placed as secondary option
Helper function moved to distributionFuntions.py, and simplified code structure. no functionality change
…ameters

Thermal is set to have a single set of parameters - 'k', 'kT', 'kT_halo', 'normali
ze', 'normalize_halo', halo'
@proy30 proy30 force-pushed the dashboard/change_to_twiss_default_for_distribution branch from 6e687d0 to 7d8151f Compare October 24, 2024 15:44
@proy30 proy30 requested a review from cemitch99 October 25, 2024 22:45
@proy30
Copy link
Contributor Author

proy30 commented Oct 25, 2024

Updated with units
chrome_Tnae78L8JK

@cemitch99 cemitch99 merged commit 0c14ed4 into ECP-WarpX:development Oct 29, 2024
16 checks passed
@proy30 proy30 deleted the dashboard/change_to_twiss_default_for_distribution branch November 21, 2024 18:12
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: dashboard our browser based trame dashboard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Dashboard] Distributions via Twiss
3 participants