From 39b6f702d733b9951ae410c2c7de0b37ffa713d1 Mon Sep 17 00:00:00 2001 From: Marco Garten Date: Mon, 25 Mar 2024 23:54:15 -0700 Subject: [PATCH] Rename sigma to lambda where not stddev (#552) * Rename sigma to lambda where not stddev This commit replaces (hopefully) all occurrences of sigma<...> as input to particle distributions with lambda<...> since the parameter describes the axis intercepts of the phase space ellipse and is only identical to the RMS extents when there is no correlation between q (position) and p (momentum). * Apply changes after rebase Changed PyTorch 15-stage example needed sigma->lambda --- docs/source/theory/intro.rst | 6 +-- docs/source/usage/parameters.rst | 12 +++--- docs/source/usage/python.rst | 26 ++++++------- examples/alignment/input_alignment.in | 12 +++--- examples/alignment/run_alignment.py | 12 +++--- examples/aperture/input_aperture.in | 12 +++--- examples/aperture/run_aperture.py | 12 +++--- examples/apochromatic/input_apochromatic.in | 12 +++--- .../apochromatic/input_apochromatic_pl.in | 12 +++--- examples/apochromatic/run_apochromatic.py | 12 +++--- examples/apochromatic/run_apochromatic_pl.py | 12 +++--- examples/cfbend/README.rst | 2 +- examples/cfbend/input_cfbend.in | 12 +++--- examples/cfbend/run_cfbend.py | 12 +++--- examples/cfbend/run_cfbend_madx.py | 12 +++--- examples/cfchannel/input_cfchannel.in | 12 +++--- examples/cfchannel/input_cfchannel_10nC.in | 12 +++--- examples/cfchannel/run_cfchannel.py | 12 +++--- examples/cfchannel/run_cfchannel_10nC.py | 12 +++--- examples/chicane/README.rst | 2 +- examples/chicane/input_chicane.in | 12 +++--- examples/chicane/plot_chicane.py | 8 ++-- examples/chicane/run_chicane.py | 12 +++--- examples/chicane/run_chicane_madx.py | 12 +++--- examples/compression/input_compression.in | 12 +++--- examples/compression/run_compression.py | 12 +++--- examples/cyclotron/input_cyclotron.in | 12 +++--- examples/cyclotron/run_cyclotron.py | 12 +++--- examples/distgen/input_gaussian.in | 12 +++--- examples/distgen/input_kurth4d.in | 12 +++--- examples/distgen/input_kvdist.in | 12 +++--- examples/distgen/input_semigaussian.in | 12 +++--- .../epac2004_benchmarks/input_fodo_rf_SC.in | 12 +++--- .../epac2004_benchmarks/run_fodo_rf_SC.py | 12 +++--- examples/expanding_beam/input_expanding.in | 12 +++--- examples/expanding_beam/run_expanding.py | 12 +++--- examples/fodo/README.rst | 2 +- examples/fodo/input_fodo.in | 12 +++--- examples/fodo/plot_fodo.py | 8 ++-- examples/fodo/run_fodo.py | 12 +++--- examples/fodo/run_fodo_madx.py | 12 +++--- examples/fodo/run_fodo_programmable.py | 12 +++--- examples/fodo_chromatic/input_fodo_chr.in | 12 +++--- examples/fodo_chromatic/run_fodo_chr.py | 12 +++--- examples/fodo_rf/README.rst | 2 +- examples/fodo_rf/input_fodo_rf.in | 12 +++--- examples/fodo_rf/run_fodo_rf.py | 12 +++--- examples/fodo_tune/input_fodo_tune.in | 12 +++--- examples/fodo_tune/run_fodo_tune.py | 12 +++--- examples/iota_lattice/input_iotalattice.in | 12 +++--- .../iota_lattice/input_iotalattice_sdep.in | 12 +++--- examples/iota_lattice/run_iotalattice.py | 12 +++--- examples/iota_lattice/run_iotalattice_sdep.py | 12 +++--- examples/iota_lens/input_iotalens.in | 12 +++--- examples/iota_lens/input_iotalens_sdep.in | 24 ++++++------ examples/iota_lens/run_iotalens.py | 12 +++--- examples/iota_lens/run_iotalens_sdep.py | 12 +++--- examples/kicker/README.rst | 2 +- examples/kicker/input_kicker.in | 12 +++--- examples/kicker/run_hvkicker_madx.py | 12 +++--- examples/kicker/run_kicker.py | 12 +++--- examples/kicker/run_kicker_madx.py | 12 +++--- examples/kurth/README.rst | 4 +- examples/kurth/input_kurth_10nC_periodic.in | 12 +++--- examples/kurth/input_kurth_periodic.in | 12 +++--- examples/kurth/run_kurth_10nC_periodic.py | 12 +++--- examples/kurth/run_kurth_periodic.py | 12 +++--- examples/multipole/input_multipole.in | 12 +++--- examples/multipole/run_multipole.py | 12 +++--- examples/positron_channel/input_positron.in | 12 +++--- examples/positron_channel/run_positron.py | 12 +++--- .../run_ml_surrogate_15_stage.py | 12 +++--- .../input_quadrupole_softedge.in | 12 +++--- .../run_quadrupole_softedge.py | 12 +++--- examples/rfcavity/README.rst | 2 +- examples/rfcavity/input_rfcavity.in | 12 +++--- examples/rfcavity/run_rfcavity.py | 12 +++--- examples/rotation/input_rotation.in | 12 +++--- examples/rotation/run_rotation.py | 12 +++--- examples/solenoid/input_solenoid.in | 12 +++--- examples/solenoid/run_solenoid.py | 12 +++--- examples/solenoid/run_solenoid_madx.py | 12 +++--- .../input_solenoid_softedge.in | 12 +++--- .../run_solenoid_softedge.py | 12 +++--- examples/thin_dipole/input_thin_dipole.in | 12 +++--- examples/thin_dipole/run_thin_dipole.py | 12 +++--- src/initialization/InitDistribution.H | 38 +++++++++---------- src/initialization/InitDistribution.cpp | 32 ++++++++-------- src/particles/distribution/Gaussian.H | 38 +++++++++---------- src/particles/distribution/KVdist.H | 36 +++++++++--------- src/particles/distribution/Kurth4D.H | 36 +++++++++--------- src/particles/distribution/Kurth6D.H | 36 +++++++++--------- src/particles/distribution/Semigaussian.H | 36 +++++++++--------- src/particles/distribution/Triangle.H | 34 ++++++++--------- src/particles/distribution/Waterbag.H | 36 +++++++++--------- src/python/distribution.cpp | 28 +++++++------- tests/python/test_dataframe.py | 12 +++--- tests/python/test_impactx.py | 24 ++++++------ tests/python/test_push.py | 12 +++--- tests/python/test_transformation.py | 12 +++--- 100 files changed, 693 insertions(+), 693 deletions(-) diff --git a/docs/source/theory/intro.rst b/docs/source/theory/intro.rst index ecf63bd89..b37131aa0 100644 --- a/docs/source/theory/intro.rst +++ b/docs/source/theory/intro.rst @@ -74,12 +74,12 @@ The first option is to characterize the distribution via the intersections of th .. math:: \begin{align} - \sigma_q &= \sqrt{\frac{\epsilon}{\gamma}} \\ - \sigma_p &= \sqrt{\frac{\epsilon}{\beta}} \\ + \lambda_q &= \sqrt{\frac{\epsilon}{\gamma}} \\ + \lambda_p &= \sqrt{\frac{\epsilon}{\beta}} \\ \mu_{qp} &= \frac{\alpha}{\sqrt{\beta \gamma}} \end{align} -The units are :math:`[\sigma_q] = \mathrm{m}`, :math:`[\sigma_p] = \mathrm{rad}`, and :math:`[\mu_{qp}] = 1`. +The units are :math:`[\lambda_q] = \mathrm{m}`, :math:`[\lambda_p] = \mathrm{rad}`, and :math:`[\mu_{qp}] = 1`. To convert between normalized and unnormalized emittance, use the relation :math:`\epsilon_\mathrm{n} = (\beta\gamma)_\mathrm{ref} \cdot \epsilon` which uses the momentum of the reference particle. **Attention**: Here, :math:`(\beta\gamma)_\mathrm{ref}` are the Lorentz variables for the reference particle momentum and not the Courant-Snyder parameters. diff --git a/docs/source/usage/parameters.rst b/docs/source/usage/parameters.rst index 780477511..f858f9608 100644 --- a/docs/source/usage/parameters.rst +++ b/docs/source/usage/parameters.rst @@ -148,12 +148,12 @@ Initial Beam Distributions * Parameters that describe the phase space ellipse and position-momentum correlations: - * ``beam.sigmaX`` (``float``, in meters) phase space ellipse intersection with X - * ``beam.sigmaY`` (``float``, in meters) phase space ellipse intersection with Y - * ``beam.sigmaT`` (``float``, in meters) phase space ellipse intersection with T, normalized by multiplying with the speed of light *c* - * ``beam.sigmaPx`` (``float``, in radians) phase space ellipse intersection with Px - * ``beam.sigmaPy`` (``float``, in radians) phase space ellipse intersection with Py - * ``beam.sigmaPt`` (``float``, in radians) phase space ellipse intersection with Pt + * ``beam.lambdaX`` (``float``, in meters) phase space ellipse intersection with X + * ``beam.lambdaY`` (``float``, in meters) phase space ellipse intersection with Y + * ``beam.lambdaT`` (``float``, in meters) phase space ellipse intersection with T, normalized by multiplying with the speed of light *c* + * ``beam.lambdaPx`` (``float``, in radians) phase space ellipse intersection with Px + * ``beam.lambdaPy`` (``float``, in radians) phase space ellipse intersection with Py + * ``beam.lambdaPt`` (``float``, in radians) phase space ellipse intersection with Pt * ``beam.muxpx`` (``float``, dimensionless, default: ``0``) correlation X-Px * ``beam.muypy`` (``float``, dimensionless, default: ``0``) correlation Y-Py * ``beam.mutpt`` (``float``, dimensionless, default: ``0``) correlation T-Pt diff --git a/docs/source/usage/python.rst b/docs/source/usage/python.rst index fa85ca19d..98dda6b89 100644 --- a/docs/source/usage/python.rst +++ b/docs/source/usage/python.rst @@ -379,33 +379,33 @@ This module provides particle beam distributions that can be used to initialize .. py:module:: impactx.distribution :synopsis: Particle beam distributions in ImpactX -.. py:class:: impactx.distribution.Gaussian(sigx, sigy, sigt, sigpx, sigpy, sigpt, 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) A 6D Gaussian distribution. - :param sigx: for zero correlation, these are the related RMS sizes (in meters) - :param sigy: see sigx - :param sigt: see sigx - :param sigpx: RMS momentum - :param sigpy: see sigpx - :param sigpt: see sigpx + :param lambdax: phase space position axis intercept; for zero correlation, these are the related RMS sizes (in meters) + :param lambday: see lambdax + :param lambdat: see lambdax + :param lambdapx: phase space momentum axis intercept; for zero correlation, these are the related normalized RMS momenta (in radians) + :param lambdapy: see lambdapx + :param lambdapt: see lambdapx :param muxpx: correlation length-momentum :param muypy: see muxpx :param mutpt: see muxpx -.. py:class:: impactx.distribution.Kurth4D(sigx, sigy, sigt, sigpx, sigpy, sigpt, muxpx=0.0, muypy=0.0, mutpt=0.0) +.. py:class:: impactx.distribution.Kurth4D(lambdax, lambday, lambdat, lambdapx, lambdapy, lambdapt, muxpx=0.0, muypy=0.0, mutpt=0.0) A 4D Kurth distribution transversely + a uniform distribution in t + a Gaussian distribution in pt. -.. py:class:: impactx.distribution.Kurth6D(sigx, sigy, sigt, sigpx, sigpy, sigpt, muxpx=0.0, muypy=0.0, mutpt=0.0) +.. py:class:: impactx.distribution.Kurth6D(lambdax, lambday, lambdat, lambdapx, lambdapy, lambdapt, muxpx=0.0, muypy=0.0, mutpt=0.0) A 6D Kurth distribution. R. Kurth, Quarterly of Applied Mathematics vol. 32, pp. 325-329 (1978) C. Mitchell, K. Hwang and R. D. Ryne, IPAC2021, WEPAB248 (2021) -.. py:class:: impactx.distribution.KVdist(sigx, sigy, sigt, sigpx, sigpy, sigpt, muxpx=0.0, muypy=0.0, mutpt=0.0) +.. py:class:: impactx.distribution.KVdist(lambdax, lambday, lambdat, lambdapx, lambdapy, lambdapt, muxpx=0.0, muypy=0.0, mutpt=0.0) A K-V distribution transversely + a uniform distribution in t + a Gaussian distribution in pt. @@ -414,18 +414,18 @@ This module provides particle beam distributions that can be used to initialize This distribution sets all values to zero. -.. py:class:: impactx.distribution.Semigaussian(sigx, sigy, sigt, sigpx, sigpy, sigpt, muxpx=0.0, muypy=0.0, mutpt=0.0) +.. py:class:: impactx.distribution.Semigaussian(lambdax, lambday, lambdat, lambdapx, lambdapy, lambdapt, muxpx=0.0, muypy=0.0, mutpt=0.0) A 6D Semi-Gaussian distribution (uniform in position, Gaussian in momentum). -.. py:class:: impactx.distribution.Triangle(sigx, sigy, sigt, sigpx, sigpy, sigpt, muxpx=0.0, muypy=0.0, mutpt=0.0) +.. py:class:: impactx.distribution.Triangle(lambdax, lambday, lambdat, lambdapx, lambdapy, lambdapt, muxpx=0.0, muypy=0.0, mutpt=0.0) A triangle distribution for laser-plasma acceleration related applications. A ramped, triangular current profile with a Gaussian energy spread (possibly correlated). The transverse distribution is a 4D waterbag. -.. py:class:: impactx.distribution.Waterbag(sigx, sigy, sigt, sigpx, sigpy, sigpt, muxpx=0.0, muypy=0.0, mutpt=0.0) +.. py:class:: impactx.distribution.Waterbag(lambdax, lambday, lambdat, lambdapx, lambdapy, lambdapt, muxpx=0.0, muypy=0.0, mutpt=0.0) A 6D Waterbag distribution. diff --git a/examples/alignment/input_alignment.in b/examples/alignment/input_alignment.in index b98a42c0e..19a5339b5 100644 --- a/examples/alignment/input_alignment.in +++ b/examples/alignment/input_alignment.in @@ -7,12 +7,12 @@ beam.kin_energy = 2.0e3 beam.charge = 1.0e-9 beam.particle = proton beam.distribution = waterbag -beam.sigmaX = 1.16098260008648811e-3 -beam.sigmaY = 1.16098260008648811e-3 -beam.sigmaT = 1.0e-3 -beam.sigmaPx = 0.580491300043e-3 -beam.sigmaPy = 0.580491300043e-3 -beam.sigmaPt = 2.0e-3 +beam.lambdaX = 1.16098260008648811e-3 +beam.lambdaY = 1.16098260008648811e-3 +beam.lambdaT = 1.0e-3 +beam.lambdaPx = 0.580491300043e-3 +beam.lambdaPy = 0.580491300043e-3 +beam.lambdaPt = 2.0e-3 beam.muxpx = 0.0 beam.muypy = 0.0 beam.mutpt = 0.0 diff --git a/examples/alignment/run_alignment.py b/examples/alignment/run_alignment.py index 47ad8f08d..ccba11a3e 100755 --- a/examples/alignment/run_alignment.py +++ b/examples/alignment/run_alignment.py @@ -30,12 +30,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=1.16098260008648811e-3, - sigmaY=1.16098260008648811e-3, - sigmaT=1.0e-3, - sigmaPx=0.580491300043e-3, - sigmaPy=0.580491300043e-3, - sigmaPt=2.0e-3, + lambdaX=1.16098260008648811e-3, + lambdaY=1.16098260008648811e-3, + lambdaT=1.0e-3, + lambdaPx=0.580491300043e-3, + lambdaPy=0.580491300043e-3, + lambdaPt=2.0e-3, muxpx=0.0, muypy=0.0, mutpt=0.0, diff --git a/examples/aperture/input_aperture.in b/examples/aperture/input_aperture.in index 759f1914f..cb28dee88 100644 --- a/examples/aperture/input_aperture.in +++ b/examples/aperture/input_aperture.in @@ -7,12 +7,12 @@ beam.kin_energy = 250.0 beam.charge = 1.0e-9 beam.particle = proton beam.distribution = waterbag -beam.sigmaX = 1.559531175539e-3 -beam.sigmaY = 2.205510139392e-3 -beam.sigmaT = 1.0e-3 -beam.sigmaPx = 6.41218345413e-4 -beam.sigmaPy = 9.06819680526e-4 -beam.sigmaPt = 1.0e-3 +beam.lambdaX = 1.559531175539e-3 +beam.lambdaY = 2.205510139392e-3 +beam.lambdaT = 1.0e-3 +beam.lambdaPx = 6.41218345413e-4 +beam.lambdaPy = 9.06819680526e-4 +beam.lambdaPt = 1.0e-3 beam.muxpx = 0.0 beam.muypy = 0.0 beam.mutpt = 0.0 diff --git a/examples/aperture/run_aperture.py b/examples/aperture/run_aperture.py index cc1ec8fbc..7e8cc73fc 100755 --- a/examples/aperture/run_aperture.py +++ b/examples/aperture/run_aperture.py @@ -38,12 +38,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=1.559531175539e-3, - sigmaY=2.205510139392e-3, - sigmaT=1.0e-3, - sigmaPx=6.41218345413e-4, - sigmaPy=9.06819680526e-4, - sigmaPt=1.0e-3, + lambdaX=1.559531175539e-3, + lambdaY=2.205510139392e-3, + lambdaT=1.0e-3, + lambdaPx=6.41218345413e-4, + lambdaPy=9.06819680526e-4, + lambdaPt=1.0e-3, ) sim.add_particles(bunch_charge_C, distr, npart) diff --git a/examples/apochromatic/input_apochromatic.in b/examples/apochromatic/input_apochromatic.in index 1074f7b40..dad950167 100644 --- a/examples/apochromatic/input_apochromatic.in +++ b/examples/apochromatic/input_apochromatic.in @@ -7,12 +7,12 @@ beam.kin_energy = 100.0e3 # 100 GeV nominal energy beam.charge = 1.0e-9 beam.particle = electron beam.distribution = gaussian -beam.sigmaX = 1.288697604e-6 -beam.sigmaY = 1.288697604e-6 -beam.sigmaT = 1.0e-6 -beam.sigmaPx = 3.965223396e-6 -beam.sigmaPy = 3.965223396e-6 -beam.sigmaPt = 0.01 #1% energy spread +beam.lambdaX = 1.288697604e-6 +beam.lambdaY = 1.288697604e-6 +beam.lambdaT = 1.0e-6 +beam.lambdaPx = 3.965223396e-6 +beam.lambdaPy = 3.965223396e-6 +beam.lambdaPt = 0.01 #1% energy spread beam.muxpx = 0.0 beam.muypy = 0.0 beam.mutpt = 0.0 diff --git a/examples/apochromatic/input_apochromatic_pl.in b/examples/apochromatic/input_apochromatic_pl.in index 8588501f9..750166ab2 100644 --- a/examples/apochromatic/input_apochromatic_pl.in +++ b/examples/apochromatic/input_apochromatic_pl.in @@ -7,12 +7,12 @@ beam.kin_energy = 100.0e3 # 100 GeV nominal energy beam.charge = 1.0e-9 beam.particle = electron beam.distribution = gaussian -beam.sigmaX = 1.288697604e-6 -beam.sigmaY = 1.288697604e-6 -beam.sigmaT = 1.0e-6 -beam.sigmaPx = 3.965223396e-6 -beam.sigmaPy = 3.965223396e-6 -beam.sigmaPt = 0.01 #1% energy spread +beam.lambdaX = 1.288697604e-6 +beam.lambdaY = 1.288697604e-6 +beam.lambdaT = 1.0e-6 +beam.lambdaPx = 3.965223396e-6 +beam.lambdaPy = 3.965223396e-6 +beam.lambdaPt = 0.01 #1% energy spread beam.muxpx = 0.0 beam.muypy = 0.0 beam.mutpt = 0.0 diff --git a/examples/apochromatic/run_apochromatic.py b/examples/apochromatic/run_apochromatic.py index 0671bc6bf..b2333edcc 100644 --- a/examples/apochromatic/run_apochromatic.py +++ b/examples/apochromatic/run_apochromatic.py @@ -31,12 +31,12 @@ # particle bunch distr = distribution.Gaussian( - sigmaX=1.288697604e-6, - sigmaY=1.288697604e-6, - sigmaT=1.0e-6, - sigmaPx=3.965223396e-6, - sigmaPy=3.965223396e-6, - sigmaPt=0.01, # 1% energy spread + lambdaX=1.288697604e-6, + lambdaY=1.288697604e-6, + lambdaT=1.0e-6, + lambdaPx=3.965223396e-6, + lambdaPy=3.965223396e-6, + lambdaPt=0.01, # 1% energy spread muxpx=0.0, muypy=0.0, mutpt=0.0, diff --git a/examples/apochromatic/run_apochromatic_pl.py b/examples/apochromatic/run_apochromatic_pl.py index 0aca9fbe1..b7f92cb33 100644 --- a/examples/apochromatic/run_apochromatic_pl.py +++ b/examples/apochromatic/run_apochromatic_pl.py @@ -31,12 +31,12 @@ # particle bunch distr = distribution.Gaussian( - sigmaX=1.288697604e-6, - sigmaY=1.288697604e-6, - sigmaT=1.0e-6, - sigmaPx=3.965223396e-6, - sigmaPy=3.965223396e-6, - sigmaPt=0.01, # 1% energy spread + lambdaX=1.288697604e-6, + lambdaY=1.288697604e-6, + lambdaT=1.0e-6, + lambdaPx=3.965223396e-6, + lambdaPy=3.965223396e-6, + lambdaPt=0.01, # 1% energy spread muxpx=0.0, muypy=0.0, mutpt=0.0, diff --git a/examples/cfbend/README.rst b/examples/cfbend/README.rst index 75a99ac47..960a7f39a 100644 --- a/examples/cfbend/README.rst +++ b/examples/cfbend/README.rst @@ -11,7 +11,7 @@ C. Steier et al, "Status of the Conceptual Design of ALS-U", IPAC2017, WEPAB104, A 2 GeV electron bunch with normalized transverse rms emittance of 50 pm undergoes a 3.76 deg bend. -In this test, the initial and final values of :math:`\sigma_x`, :math:`\sigma_y`, :math:`\sigma_t`, :math:`\epsilon_x`, :math:`\epsilon_y`, and :math:`\epsilon_t` must agree with nominal values. +In this test, the initial and final values of :math:`\lambda_x`, :math:`\lambda_y`, :math:`\lambda_t`, :math:`\epsilon_x`, :math:`\epsilon_y`, and :math:`\epsilon_t` must agree with nominal values. Run diff --git a/examples/cfbend/input_cfbend.in b/examples/cfbend/input_cfbend.in index 07fe04151..b809b89d7 100644 --- a/examples/cfbend/input_cfbend.in +++ b/examples/cfbend/input_cfbend.in @@ -7,12 +7,12 @@ beam.kin_energy = 2.0e3 #2 GeV beam.charge = 1.0e-9 beam.particle = electron beam.distribution = waterbag -beam.sigmaX = 5.0e-6 #5 um -beam.sigmaY = 8.0e-6 #8 um -beam.sigmaT = 0.0599584916 #200 ps -beam.sigmaPx = 2.5543422003e-9 #exn = 50 pm-rad -beam.sigmaPy = 1.5964638752e-9 #eyn = 50 pm-rad -beam.sigmaPt = 9.0e-4 #approximately dE/E +beam.lambdaX = 5.0e-6 #5 um +beam.lambdaY = 8.0e-6 #8 um +beam.lambdaT = 0.0599584916 #200 ps +beam.lambdaPx = 2.5543422003e-9 #exn = 50 pm-rad +beam.lambdaPy = 1.5964638752e-9 #eyn = 50 pm-rad +beam.lambdaPt = 9.0e-4 #approximately dE/E beam.muxpx = 0.0 beam.muypy = 0.0 beam.mutpt = 0.0 diff --git a/examples/cfbend/run_cfbend.py b/examples/cfbend/run_cfbend.py index f1ca53e92..22acc5834 100644 --- a/examples/cfbend/run_cfbend.py +++ b/examples/cfbend/run_cfbend.py @@ -31,12 +31,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=5.0e-6, # 5 um - sigmaY=8.0e-6, # 8 um - sigmaT=0.0599584916, # 200 ps - sigmaPx=2.5543422003e-9, # exn = 50 pm-rad - sigmaPy=1.5964638752e-9, # eyn = 50 pm-rad - sigmaPt=9.0e-4, # approximately dE/E + lambdaX=5.0e-6, # 5 um + lambdaY=8.0e-6, # 8 um + lambdaT=0.0599584916, # 200 ps + lambdaPx=2.5543422003e-9, # exn = 50 pm-rad + lambdaPy=1.5964638752e-9, # eyn = 50 pm-rad + lambdaPt=9.0e-4, # approximately dE/E muxpx=0.0, muypy=0.0, mutpt=0.0, diff --git a/examples/cfbend/run_cfbend_madx.py b/examples/cfbend/run_cfbend_madx.py index 996c9c426..9b40785f9 100755 --- a/examples/cfbend/run_cfbend_madx.py +++ b/examples/cfbend/run_cfbend_madx.py @@ -30,12 +30,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=2.2951017632e-5, - sigmaY=1.3084093142e-5, - sigmaT=5.5555553e-8, - sigmaPx=1.598353425e-6, - sigmaPy=2.803697378e-6, - sigmaPt=2.000000000e-6, + lambdaX=2.2951017632e-5, + lambdaY=1.3084093142e-5, + lambdaT=5.5555553e-8, + lambdaPx=1.598353425e-6, + lambdaPy=2.803697378e-6, + lambdaPt=2.000000000e-6, muxpx=0.933345606203060, muypy=0.933345606203060, mutpt=0.999999961419755, diff --git a/examples/cfchannel/input_cfchannel.in b/examples/cfchannel/input_cfchannel.in index b155e4483..c9fcef412 100644 --- a/examples/cfchannel/input_cfchannel.in +++ b/examples/cfchannel/input_cfchannel.in @@ -7,12 +7,12 @@ beam.kin_energy = 2.0e3 beam.charge = 1.0e-9 beam.particle = proton beam.distribution = waterbag -beam.sigmaX = 1.0e-3 -beam.sigmaY = 1.0e-3 -beam.sigmaT = 3.369701494258956e-4 -beam.sigmaPx = 1.0e-3 -beam.sigmaPy = 1.0e-3 -beam.sigmaPt = 2.9676219145931020e-3 +beam.lambdaX = 1.0e-3 +beam.lambdaY = 1.0e-3 +beam.lambdaT = 3.369701494258956e-4 +beam.lambdaPx = 1.0e-3 +beam.lambdaPy = 1.0e-3 +beam.lambdaPt = 2.9676219145931020e-3 beam.muxpx = 0.0 beam.muypy = 0.0 beam.mutpt = 0.0 diff --git a/examples/cfchannel/input_cfchannel_10nC.in b/examples/cfchannel/input_cfchannel_10nC.in index f01669f3f..ad4ef7400 100644 --- a/examples/cfchannel/input_cfchannel_10nC.in +++ b/examples/cfchannel/input_cfchannel_10nC.in @@ -8,12 +8,12 @@ beam.kin_energy = 2.0e3 beam.charge = 1.0e-8 beam.particle = proton beam.distribution = waterbag -beam.sigmaX = 1.2154443728379865788e-3 -beam.sigmaY = 1.2154443728379865788e-3 -beam.sigmaT = 4.0956844276541331005e-4 -beam.sigmaPx = 8.2274435782286157175e-4 -beam.sigmaPy = 8.2274435782286157175e-4 -beam.sigmaPt = 2.4415943602685364584e-3 +beam.lambdaX = 1.2154443728379865788e-3 +beam.lambdaY = 1.2154443728379865788e-3 +beam.lambdaT = 4.0956844276541331005e-4 +beam.lambdaPx = 8.2274435782286157175e-4 +beam.lambdaPy = 8.2274435782286157175e-4 +beam.lambdaPt = 2.4415943602685364584e-3 ############################################################################### diff --git a/examples/cfchannel/run_cfchannel.py b/examples/cfchannel/run_cfchannel.py index 94b93671c..b17d738ea 100755 --- a/examples/cfchannel/run_cfchannel.py +++ b/examples/cfchannel/run_cfchannel.py @@ -31,12 +31,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=1.0e-3, - sigmaY=1.0e-3, - sigmaT=3.369701494258956e-4, - sigmaPx=1.0e-3, - sigmaPy=1.0e-3, - sigmaPt=2.9676219145931020e-3, + lambdaX=1.0e-3, + lambdaY=1.0e-3, + lambdaT=3.369701494258956e-4, + lambdaPx=1.0e-3, + lambdaPy=1.0e-3, + lambdaPt=2.9676219145931020e-3, ) sim.add_particles(bunch_charge_C, distr, npart) diff --git a/examples/cfchannel/run_cfchannel_10nC.py b/examples/cfchannel/run_cfchannel_10nC.py index b41c05b71..771d76f12 100755 --- a/examples/cfchannel/run_cfchannel_10nC.py +++ b/examples/cfchannel/run_cfchannel_10nC.py @@ -33,12 +33,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=1.2154443728379865788e-3, - sigmaY=1.2154443728379865788e-3, - sigmaT=4.0956844276541331005e-4, - sigmaPx=8.2274435782286157175e-4, - sigmaPy=8.2274435782286157175e-4, - sigmaPt=2.4415943602685364584e-3, + lambdaX=1.2154443728379865788e-3, + lambdaY=1.2154443728379865788e-3, + lambdaT=4.0956844276541331005e-4, + lambdaPx=8.2274435782286157175e-4, + lambdaPy=8.2274435782286157175e-4, + lambdaPt=2.4415943602685364584e-3, ) sim.add_particles(bunch_charge_C, distr, npart) diff --git a/examples/chicane/README.rst b/examples/chicane/README.rst index f2511cb9c..8dd9b05a6 100644 --- a/examples/chicane/README.rst +++ b/examples/chicane/README.rst @@ -11,7 +11,7 @@ A 5 GeV electron bunch with normalized transverse rms emittance of 1 um undergoe The emittances should be preserved, and the rms pulse length should decrease by the compression factor (10). -In this test, the initial and final values of :math:`\sigma_x`, :math:`\sigma_y`, :math:`\sigma_t`, :math:`\epsilon_x`, :math:`\epsilon_y`, and :math:`\epsilon_t` must agree with nominal values. +In this test, the initial and final values of :math:`\lambda_x`, :math:`\lambda_y`, :math:`\lambda_t`, :math:`\epsilon_x`, :math:`\epsilon_y`, and :math:`\epsilon_t` must agree with nominal values. Run diff --git a/examples/chicane/input_chicane.in b/examples/chicane/input_chicane.in index 518eee2eb..57d11cf9e 100644 --- a/examples/chicane/input_chicane.in +++ b/examples/chicane/input_chicane.in @@ -7,12 +7,12 @@ beam.kin_energy = 5.0e3 beam.charge = 1.0e-9 beam.particle = electron beam.distribution = waterbag -beam.sigmaX = 2.2951017632e-5 -beam.sigmaY = 1.3084093142e-5 -beam.sigmaT = 5.5555553e-8 -beam.sigmaPx = 1.598353425e-6 -beam.sigmaPy = 2.803697378e-6 -beam.sigmaPt = 2.000000000e-6 +beam.lambdaX = 2.2951017632e-5 +beam.lambdaY = 1.3084093142e-5 +beam.lambdaT = 5.5555553e-8 +beam.lambdaPx = 1.598353425e-6 +beam.lambdaPy = 2.803697378e-6 +beam.lambdaPt = 2.000000000e-6 beam.muxpx = 0.933345606203060 beam.muypy = 0.933345606203060 beam.mutpt = 0.999999961419755 diff --git a/examples/chicane/plot_chicane.py b/examples/chicane/plot_chicane.py index ce69eb624..04f833a68 100755 --- a/examples/chicane/plot_chicane.py +++ b/examples/chicane/plot_chicane.py @@ -133,8 +133,8 @@ def read_time_series(file_pattern): ax0.set_ylabel(r"$x$ [m]") ax1 = axs[1] -im_sigx = ax1.plot(z, sigx, label=r"$\sigma_x$") -im_sigt = ax1.plot(z, sigt, label=r"$\sigma_t$") +im_sigx = ax1.plot(z, sigx, label=r"$\lambda_x$") +im_sigt = ax1.plot(z, sigt, label=r"$\lambda_t$") ax2 = ax1.twinx() ax2.set_prop_cycle(None) # reset color cycle im_emittance_x = ax2.plot(z, emittance_x, ":", label=r"$\epsilon_x$") @@ -144,7 +144,7 @@ def read_time_series(file_pattern): handles=im_sigx + im_sigt + im_emittance_x + im_emittance_t, loc="upper right" ) ax1.set_xlabel(r"$z$ [m]") -ax1.set_ylabel(r"$\sigma_{x,t}$ [mm]") +ax1.set_ylabel(r"$\lambda_{x,t}$ [mm]") # ax2.set_ylabel(r"$\epsilon_{x,y}$ [mm-mrad]") ax2.set_ylabel(r"$\epsilon_{x,t}$ [nm]") ax1.set_ylim([0, None]) @@ -152,7 +152,7 @@ def read_time_series(file_pattern): ax1.xaxis.set_major_locator(MaxNLocator(integer=True)) plt.tight_layout() if args.save_png: - plt.savefig("chicane_sigma.png") + plt.savefig("chicane_lambda.png") else: plt.show() diff --git a/examples/chicane/run_chicane.py b/examples/chicane/run_chicane.py index 9aa425dd8..a061b33e7 100644 --- a/examples/chicane/run_chicane.py +++ b/examples/chicane/run_chicane.py @@ -31,12 +31,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=2.2951017632e-5, - sigmaY=1.3084093142e-5, - sigmaT=5.5555553e-8, - sigmaPx=1.598353425e-6, - sigmaPy=2.803697378e-6, - sigmaPt=2.000000000e-6, + lambdaX=2.2951017632e-5, + lambdaY=1.3084093142e-5, + lambdaT=5.5555553e-8, + lambdaPx=1.598353425e-6, + lambdaPy=2.803697378e-6, + lambdaPt=2.000000000e-6, muxpx=0.933345606203060, muypy=0.933345606203060, mutpt=0.999999961419755, diff --git a/examples/chicane/run_chicane_madx.py b/examples/chicane/run_chicane_madx.py index ff0b00f45..33f22e899 100755 --- a/examples/chicane/run_chicane_madx.py +++ b/examples/chicane/run_chicane_madx.py @@ -30,12 +30,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=2.2951017632e-5, - sigmaY=1.3084093142e-5, - sigmaT=5.5555553e-8, - sigmaPx=1.598353425e-6, - sigmaPy=2.803697378e-6, - sigmaPt=2.000000000e-6, + lambdaX=2.2951017632e-5, + lambdaY=1.3084093142e-5, + lambdaT=5.5555553e-8, + lambdaPx=1.598353425e-6, + lambdaPy=2.803697378e-6, + lambdaPt=2.000000000e-6, muxpx=0.933345606203060, muypy=0.933345606203060, mutpt=0.999999961419755, diff --git a/examples/compression/input_compression.in b/examples/compression/input_compression.in index e083268cc..d83ff12df 100644 --- a/examples/compression/input_compression.in +++ b/examples/compression/input_compression.in @@ -7,12 +7,12 @@ beam.kin_energy = 20.0 beam.charge = 1.0e-9 beam.particle = electron beam.distribution = waterbag -beam.sigmaX = 0.5e-3 -beam.sigmaY = 0.5e-3 -beam.sigmaT = 5.0e-3 -beam.sigmaPx = 1.0e-5 -beam.sigmaPy = 1.0e-5 -beam.sigmaPt = 4.0e-6 +beam.lambdaX = 0.5e-3 +beam.lambdaY = 0.5e-3 +beam.lambdaT = 5.0e-3 +beam.lambdaPx = 1.0e-5 +beam.lambdaPy = 1.0e-5 +beam.lambdaPt = 4.0e-6 beam.muxpx = 0.0 beam.muypy = 0.0 beam.mutpt = 0.0 diff --git a/examples/compression/run_compression.py b/examples/compression/run_compression.py index b62a84ceb..16dc6d046 100644 --- a/examples/compression/run_compression.py +++ b/examples/compression/run_compression.py @@ -32,12 +32,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=0.5e-3, - sigmaY=0.5e-3, - sigmaT=5.0e-3, - sigmaPx=1.0e-5, - sigmaPy=1.0e-5, - sigmaPt=4.0e-6, + lambdaX=0.5e-3, + lambdaY=0.5e-3, + lambdaT=5.0e-3, + lambdaPx=1.0e-5, + lambdaPy=1.0e-5, + lambdaPt=4.0e-6, ) sim.add_particles(bunch_charge_C, distr, npart) diff --git a/examples/cyclotron/input_cyclotron.in b/examples/cyclotron/input_cyclotron.in index 6cb33bcdb..db5490b21 100644 --- a/examples/cyclotron/input_cyclotron.in +++ b/examples/cyclotron/input_cyclotron.in @@ -7,12 +7,12 @@ beam.kin_energy = 4.0e-3 beam.charge = 1.0e-9 beam.particle = proton beam.distribution = waterbag -beam.sigmaX = 1.0e-3 -beam.sigmaY = 1.0e-3 -beam.sigmaT = 0.3 -beam.sigmaPx = 2.0e-4 -beam.sigmaPy = 2.0e-4 -beam.sigmaPt = 2.0e-5 +beam.lambdaX = 1.0e-3 +beam.lambdaY = 1.0e-3 +beam.lambdaT = 0.3 +beam.lambdaPx = 2.0e-4 +beam.lambdaPy = 2.0e-4 +beam.lambdaPt = 2.0e-5 beam.muxpx = 0.0 beam.muypy = 0.0 beam.mutpt = 0.0 diff --git a/examples/cyclotron/run_cyclotron.py b/examples/cyclotron/run_cyclotron.py index ebfe7ea15..d194dd8e7 100755 --- a/examples/cyclotron/run_cyclotron.py +++ b/examples/cyclotron/run_cyclotron.py @@ -30,12 +30,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=1.0e-3, - sigmaY=1.0e-3, - sigmaT=0.3, - sigmaPx=2.0e-4, - sigmaPy=2.0e-4, - sigmaPt=2.0e-5, + lambdaX=1.0e-3, + lambdaY=1.0e-3, + lambdaT=0.3, + lambdaPx=2.0e-4, + lambdaPy=2.0e-4, + lambdaPt=2.0e-5, muxpx=-0.0, muypy=0.0, mutpt=0.0, diff --git a/examples/distgen/input_gaussian.in b/examples/distgen/input_gaussian.in index 93484dc13..99ccac82d 100644 --- a/examples/distgen/input_gaussian.in +++ b/examples/distgen/input_gaussian.in @@ -7,12 +7,12 @@ beam.kin_energy = 2.0e3 beam.charge = 1.0e-9 beam.particle = electron beam.distribution = gaussian -beam.sigmaX = 3.9984884770e-5 -beam.sigmaY = 3.9984884770e-5 -beam.sigmaT = 1.0e-3 -beam.sigmaPx = 2.6623538760e-5 -beam.sigmaPy = 2.6623538760e-5 -beam.sigmaPt = 2.0e-3 +beam.lambdaX = 3.9984884770e-5 +beam.lambdaY = 3.9984884770e-5 +beam.lambdaT = 1.0e-3 +beam.lambdaPx = 2.6623538760e-5 +beam.lambdaPy = 2.6623538760e-5 +beam.lambdaPt = 2.0e-3 beam.muxpx = -0.846574929020762 beam.muypy = 0.846574929020762 beam.mutpt = 0.0 diff --git a/examples/distgen/input_kurth4d.in b/examples/distgen/input_kurth4d.in index 039185a09..e82bbd1f4 100644 --- a/examples/distgen/input_kurth4d.in +++ b/examples/distgen/input_kurth4d.in @@ -7,12 +7,12 @@ beam.kin_energy = 2.0e3 beam.charge = 1.0e-9 beam.particle = proton beam.distribution = kurth4d -beam.sigmaX = 1.0e-3 -beam.sigmaY = 1.0e-3 -beam.sigmaT = 1.0e-3 -beam.sigmaPx = 1.0e-3 -beam.sigmaPy = 1.0e-3 -beam.sigmaPt = 2.0e-3 +beam.lambdaX = 1.0e-3 +beam.lambdaY = 1.0e-3 +beam.lambdaT = 1.0e-3 +beam.lambdaPx = 1.0e-3 +beam.lambdaPy = 1.0e-3 +beam.lambdaPt = 2.0e-3 beam.muxpx = 0.0 beam.muypy = 0.0 beam.mutpt = 0.0 diff --git a/examples/distgen/input_kvdist.in b/examples/distgen/input_kvdist.in index 0713571a0..e1e551f4e 100644 --- a/examples/distgen/input_kvdist.in +++ b/examples/distgen/input_kvdist.in @@ -7,12 +7,12 @@ beam.kin_energy = 2.0e3 beam.charge = 1.0e-9 beam.particle = electron beam.distribution = kvdist -beam.sigmaX = 3.9984884770e-5 -beam.sigmaY = 3.9984884770e-5 -beam.sigmaT = 1.0e-3 -beam.sigmaPx = 2.6623538760e-5 -beam.sigmaPy = 2.6623538760e-5 -beam.sigmaPt = 2.0e-3 +beam.lambdaX = 3.9984884770e-5 +beam.lambdaY = 3.9984884770e-5 +beam.lambdaT = 1.0e-3 +beam.lambdaPx = 2.6623538760e-5 +beam.lambdaPy = 2.6623538760e-5 +beam.lambdaPt = 2.0e-3 beam.muxpx = -0.846574929020762 beam.muypy = 0.846574929020762 beam.mutpt = 0.0 diff --git a/examples/distgen/input_semigaussian.in b/examples/distgen/input_semigaussian.in index 93484dc13..99ccac82d 100644 --- a/examples/distgen/input_semigaussian.in +++ b/examples/distgen/input_semigaussian.in @@ -7,12 +7,12 @@ beam.kin_energy = 2.0e3 beam.charge = 1.0e-9 beam.particle = electron beam.distribution = gaussian -beam.sigmaX = 3.9984884770e-5 -beam.sigmaY = 3.9984884770e-5 -beam.sigmaT = 1.0e-3 -beam.sigmaPx = 2.6623538760e-5 -beam.sigmaPy = 2.6623538760e-5 -beam.sigmaPt = 2.0e-3 +beam.lambdaX = 3.9984884770e-5 +beam.lambdaY = 3.9984884770e-5 +beam.lambdaT = 1.0e-3 +beam.lambdaPx = 2.6623538760e-5 +beam.lambdaPy = 2.6623538760e-5 +beam.lambdaPt = 2.0e-3 beam.muxpx = -0.846574929020762 beam.muypy = 0.846574929020762 beam.mutpt = 0.0 diff --git a/examples/epac2004_benchmarks/input_fodo_rf_SC.in b/examples/epac2004_benchmarks/input_fodo_rf_SC.in index 8008089e1..c6efdb395 100644 --- a/examples/epac2004_benchmarks/input_fodo_rf_SC.in +++ b/examples/epac2004_benchmarks/input_fodo_rf_SC.in @@ -7,12 +7,12 @@ beam.kin_energy = 250.0 beam.charge = 1.42857142857142865e-10 beam.particle = proton beam.distribution = kurth6d -beam.sigmaX = 9.84722273e-4 -beam.sigmaY = 6.96967278e-4 -beam.sigmaT = 4.486799242214e-03 -beam.sigmaPx = 0.0 -beam.sigmaPy = 0.0 -beam.sigmaPt = 0.0 +beam.lambdaX = 9.84722273e-4 +beam.lambdaY = 6.96967278e-4 +beam.lambdaT = 4.486799242214e-03 +beam.lambdaPx = 0.0 +beam.lambdaPy = 0.0 +beam.lambdaPt = 0.0 beam.muxpx = 0.0 beam.muypy = 0.0 beam.mutpt = 0.0 diff --git a/examples/epac2004_benchmarks/run_fodo_rf_SC.py b/examples/epac2004_benchmarks/run_fodo_rf_SC.py index 882ee5036..03abc6386 100755 --- a/examples/epac2004_benchmarks/run_fodo_rf_SC.py +++ b/examples/epac2004_benchmarks/run_fodo_rf_SC.py @@ -34,12 +34,12 @@ # particle bunch distr = distribution.Kurth6D( - sigmaX=9.84722273e-4, - sigmaY=6.96967278e-4, - sigmaT=4.486799242214e-03, - sigmaPx=0.0, - sigmaPy=0.0, - sigmaPt=0.0, + lambdaX=9.84722273e-4, + lambdaY=6.96967278e-4, + lambdaT=4.486799242214e-03, + lambdaPx=0.0, + lambdaPy=0.0, + lambdaPt=0.0, ) sim.add_particles(bunch_charge_C, distr, npart) diff --git a/examples/expanding_beam/input_expanding.in b/examples/expanding_beam/input_expanding.in index 9ed4c7f07..c8ec50a44 100644 --- a/examples/expanding_beam/input_expanding.in +++ b/examples/expanding_beam/input_expanding.in @@ -7,12 +7,12 @@ beam.kin_energy = 250.0 beam.charge = 1.0e-9 beam.particle = electron beam.distribution = kurth6d -beam.sigmaX = 4.472135955e-4 -beam.sigmaY = 4.472135955e-4 -beam.sigmaT = 9.12241869e-7 -beam.sigmaPx = 0.0 -beam.sigmaPy = 0.0 -beam.sigmaPt = 0.0 +beam.lambdaX = 4.472135955e-4 +beam.lambdaY = 4.472135955e-4 +beam.lambdaT = 9.12241869e-7 +beam.lambdaPx = 0.0 +beam.lambdaPy = 0.0 +beam.lambdaPt = 0.0 ############################################################################### diff --git a/examples/expanding_beam/run_expanding.py b/examples/expanding_beam/run_expanding.py index 2258248de..c41ada0e1 100755 --- a/examples/expanding_beam/run_expanding.py +++ b/examples/expanding_beam/run_expanding.py @@ -41,12 +41,12 @@ # particle bunch distr = distribution.Kurth6D( - sigmaX=4.472135955e-4, - sigmaY=4.472135955e-4, - sigmaT=9.12241869e-7, - sigmaPx=0.0, - sigmaPy=0.0, - sigmaPt=0.0, + lambdaX=4.472135955e-4, + lambdaY=4.472135955e-4, + lambdaT=9.12241869e-7, + lambdaPx=0.0, + lambdaPy=0.0, + lambdaPt=0.0, ) sim.add_particles(bunch_charge_C, distr, npart) diff --git a/examples/fodo/README.rst b/examples/fodo/README.rst index aa925bba7..dd4e4f42c 100644 --- a/examples/fodo/README.rst +++ b/examples/fodo/README.rst @@ -16,7 +16,7 @@ We use a 2 GeV electron beam with initial unnormalized rms emittance of 2 nm. The second moments of the particle distribution after the FODO cell should coincide with the second moments of the particle distribution before the FODO cell, to within the level expected due to noise due to statistical sampling. -In this test, the initial and final values of :math:`\sigma_x`, :math:`\sigma_y`, :math:`\sigma_t`, :math:`\epsilon_x`, :math:`\epsilon_y`, and :math:`\epsilon_t` must agree with nominal values. +In this test, the initial and final values of :math:`\lambda_x`, :math:`\lambda_y`, :math:`\lambda_t`, :math:`\epsilon_x`, :math:`\epsilon_y`, and :math:`\epsilon_t` must agree with nominal values. Run diff --git a/examples/fodo/input_fodo.in b/examples/fodo/input_fodo.in index ed2ca40ab..ab3db1124 100644 --- a/examples/fodo/input_fodo.in +++ b/examples/fodo/input_fodo.in @@ -7,12 +7,12 @@ beam.kin_energy = 2.0e3 beam.charge = 1.0e-9 beam.particle = electron beam.distribution = waterbag -beam.sigmaX = 3.9984884770e-5 -beam.sigmaY = 3.9984884770e-5 -beam.sigmaT = 1.0e-3 -beam.sigmaPx = 2.6623538760e-5 -beam.sigmaPy = 2.6623538760e-5 -beam.sigmaPt = 2.0e-3 +beam.lambdaX = 3.9984884770e-5 +beam.lambdaY = 3.9984884770e-5 +beam.lambdaT = 1.0e-3 +beam.lambdaPx = 2.6623538760e-5 +beam.lambdaPy = 2.6623538760e-5 +beam.lambdaPt = 2.0e-3 beam.muxpx = -0.846574929020762 beam.muypy = 0.846574929020762 beam.mutpt = 0.0 diff --git a/examples/fodo/plot_fodo.py b/examples/fodo/plot_fodo.py index d44b3f0b2..a89890c2a 100755 --- a/examples/fodo/plot_fodo.py +++ b/examples/fodo/plot_fodo.py @@ -121,8 +121,8 @@ def read_time_series(file_pattern): # print beam transversal size over steps f = plt.figure(figsize=(9, 4.8)) ax1 = f.gca() -im_sigx = ax1.plot(z, sigx, label=r"$\sigma_x$") -im_sigy = ax1.plot(z, sigy, label=r"$\sigma_y$") +im_sigx = ax1.plot(z, sigx, label=r"$\lambda_x$") +im_sigy = ax1.plot(z, sigy, label=r"$\lambda_y$") ax2 = ax1.twinx() ax2.set_prop_cycle(None) # reset color cycle im_emittance_x = ax2.plot(z, emittance_x, ":", label=r"$\epsilon_x$") @@ -132,14 +132,14 @@ def read_time_series(file_pattern): handles=im_sigx + im_sigy + im_emittance_x + im_emittance_y, loc="lower center" ) ax1.set_xlabel(r"$z$ [m]") -ax1.set_ylabel(r"$\sigma_{x,y}$ [mm]") +ax1.set_ylabel(r"$\lambda_{x,y}$ [mm]") # ax2.set_ylabel(r"$\epsilon_{x,y}$ [mm-mrad]") ax2.set_ylabel(r"$\epsilon_{x,y}$ [nm]") ax2.set_ylim([1.5, 2.5]) ax1.xaxis.set_major_locator(MaxNLocator(integer=True)) plt.tight_layout() if args.save_png: - plt.savefig("fodo_sigma.png") + plt.savefig("fodo_lambda.png") else: plt.show() diff --git a/examples/fodo/run_fodo.py b/examples/fodo/run_fodo.py index 949457785..57703ed33 100755 --- a/examples/fodo/run_fodo.py +++ b/examples/fodo/run_fodo.py @@ -31,12 +31,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=3.9984884770e-5, - sigmaY=3.9984884770e-5, - sigmaT=1.0e-3, - sigmaPx=2.6623538760e-5, - sigmaPy=2.6623538760e-5, - sigmaPt=2.0e-3, + lambdaX=3.9984884770e-5, + lambdaY=3.9984884770e-5, + lambdaT=1.0e-3, + lambdaPx=2.6623538760e-5, + lambdaPy=2.6623538760e-5, + lambdaPt=2.0e-3, muxpx=-0.846574929020762, muypy=0.846574929020762, mutpt=0.0, diff --git a/examples/fodo/run_fodo_madx.py b/examples/fodo/run_fodo_madx.py index 34d213ce9..ed44dca0f 100755 --- a/examples/fodo/run_fodo_madx.py +++ b/examples/fodo/run_fodo_madx.py @@ -31,12 +31,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=3.9984884770e-5, - sigmaY=3.9984884770e-5, - sigmaT=1.0e-3, - sigmaPx=2.6623538760e-5, - sigmaPy=2.6623538760e-5, - sigmaPt=2.0e-3, + lambdaX=3.9984884770e-5, + lambdaY=3.9984884770e-5, + lambdaT=1.0e-3, + lambdaPx=2.6623538760e-5, + lambdaPy=2.6623538760e-5, + lambdaPt=2.0e-3, muxpx=-0.846574929020762, muypy=0.846574929020762, mutpt=0.0, diff --git a/examples/fodo/run_fodo_programmable.py b/examples/fodo/run_fodo_programmable.py index 707fab8b1..6c585eb25 100755 --- a/examples/fodo/run_fodo_programmable.py +++ b/examples/fodo/run_fodo_programmable.py @@ -40,12 +40,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=3.9984884770e-5, - sigmaY=3.9984884770e-5, - sigmaT=1.0e-3, - sigmaPx=2.6623538760e-5, - sigmaPy=2.6623538760e-5, - sigmaPt=2.0e-3, + lambdaX=3.9984884770e-5, + lambdaY=3.9984884770e-5, + lambdaT=1.0e-3, + lambdaPx=2.6623538760e-5, + lambdaPy=2.6623538760e-5, + lambdaPt=2.0e-3, muxpx=-0.846574929020762, muypy=0.846574929020762, mutpt=0.0, diff --git a/examples/fodo_chromatic/input_fodo_chr.in b/examples/fodo_chromatic/input_fodo_chr.in index 196043892..06fdda774 100644 --- a/examples/fodo_chromatic/input_fodo_chr.in +++ b/examples/fodo_chromatic/input_fodo_chr.in @@ -7,12 +7,12 @@ beam.kin_energy = 2.0e3 beam.charge = 1.0e-9 beam.particle = electron beam.distribution = waterbag -beam.sigmaX = 3.9984884770e-5 -beam.sigmaY = 3.9984884770e-5 -beam.sigmaT = 1.0e-3 -beam.sigmaPx = 2.6623538760e-5 -beam.sigmaPy = 2.6623538760e-5 -beam.sigmaPt = 2.0e-3 +beam.lambdaX = 3.9984884770e-5 +beam.lambdaY = 3.9984884770e-5 +beam.lambdaT = 1.0e-3 +beam.lambdaPx = 2.6623538760e-5 +beam.lambdaPy = 2.6623538760e-5 +beam.lambdaPt = 2.0e-3 beam.muxpx = -0.846574929020762 beam.muypy = 0.846574929020762 beam.mutpt = 0.0 diff --git a/examples/fodo_chromatic/run_fodo_chr.py b/examples/fodo_chromatic/run_fodo_chr.py index fb1d44b1b..aa4677f75 100755 --- a/examples/fodo_chromatic/run_fodo_chr.py +++ b/examples/fodo_chromatic/run_fodo_chr.py @@ -31,12 +31,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=3.9984884770e-5, - sigmaY=3.9984884770e-5, - sigmaT=1.0e-3, - sigmaPx=2.6623538760e-5, - sigmaPy=2.6623538760e-5, - sigmaPt=2.0e-3, + lambdaX=3.9984884770e-5, + lambdaY=3.9984884770e-5, + lambdaT=1.0e-3, + lambdaPx=2.6623538760e-5, + lambdaPy=2.6623538760e-5, + lambdaPt=2.0e-3, muxpx=-0.846574929020762, muypy=0.846574929020762, mutpt=0.0, diff --git a/examples/fodo_rf/README.rst b/examples/fodo_rf/README.rst index e73757e8b..7475c428c 100644 --- a/examples/fodo_rf/README.rst +++ b/examples/fodo_rf/README.rst @@ -21,7 +21,7 @@ mm-mrad in all three phase planes. The second moments of the particle distribution after the FODO cell should coincide with the second moments of the particle distribution before the FODO cell, to within the level expected due to noise due to statistical sampling. -In this test, the initial and final values of :math:`\sigma_x`, :math:`\sigma_y`, :math:`\sigma_t`, :math:`\epsilon_x`, :math:`\epsilon_y`, and :math:`\epsilon_t` must agree with nominal values. +In this test, the initial and final values of :math:`\lambda_x`, :math:`\lambda_y`, :math:`\lambda_t`, :math:`\epsilon_x`, :math:`\epsilon_y`, and :math:`\epsilon_t` must agree with nominal values. Run diff --git a/examples/fodo_rf/input_fodo_rf.in b/examples/fodo_rf/input_fodo_rf.in index 3835bd6be..7e1cfa11f 100644 --- a/examples/fodo_rf/input_fodo_rf.in +++ b/examples/fodo_rf/input_fodo_rf.in @@ -7,12 +7,12 @@ beam.kin_energy = 250.0 beam.charge = 1.0e-9 beam.particle = proton beam.distribution = waterbag -beam.sigmaX = 3.131948925200e-3 -beam.sigmaY = 1.148450209423e-3 -beam.sigmaT = 2.159922887089e-3 -beam.sigmaPx = 3.192900088357e-4 -beam.sigmaPy = 8.707386631090e-4 -beam.sigmaPt = 4.62979491526e-4 +beam.lambdaX = 3.131948925200e-3 +beam.lambdaY = 1.148450209423e-3 +beam.lambdaT = 2.159922887089e-3 +beam.lambdaPx = 3.192900088357e-4 +beam.lambdaPy = 8.707386631090e-4 +beam.lambdaPt = 4.62979491526e-4 beam.muxpx = 0.0 beam.muypy = 0.0 beam.mutpt = 0.0 diff --git a/examples/fodo_rf/run_fodo_rf.py b/examples/fodo_rf/run_fodo_rf.py index ffa3c512f..1eed9e10b 100644 --- a/examples/fodo_rf/run_fodo_rf.py +++ b/examples/fodo_rf/run_fodo_rf.py @@ -32,12 +32,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=3.131948925200e-3, - sigmaY=1.148450209423e-3, - sigmaT=2.159922887089e-3, - sigmaPx=3.192900088357e-4, - sigmaPy=8.707386631090e-4, - sigmaPt=4.62979491526e-4, + lambdaX=3.131948925200e-3, + lambdaY=1.148450209423e-3, + lambdaT=2.159922887089e-3, + lambdaPx=3.192900088357e-4, + lambdaPy=8.707386631090e-4, + lambdaPt=4.62979491526e-4, ) sim.add_particles(bunch_charge_C, distr, npart) diff --git a/examples/fodo_tune/input_fodo_tune.in b/examples/fodo_tune/input_fodo_tune.in index ee1cc2dbb..2e17003ea 100644 --- a/examples/fodo_tune/input_fodo_tune.in +++ b/examples/fodo_tune/input_fodo_tune.in @@ -7,12 +7,12 @@ beam.kin_energy = 2.0e3 beam.charge = 1.0e-9 beam.particle = electron beam.distribution = waterbag -beam.sigmaX = 3.9984884770e-5 -beam.sigmaY = 3.9984884770e-5 -beam.sigmaT = 1.0e-3 -beam.sigmaPx = 2.6623538760e-5 -beam.sigmaPy = 2.6623538760e-5 -beam.sigmaPt = 2.0e-3 +beam.lambdaX = 3.9984884770e-5 +beam.lambdaY = 3.9984884770e-5 +beam.lambdaT = 1.0e-3 +beam.lambdaPx = 2.6623538760e-5 +beam.lambdaPy = 2.6623538760e-5 +beam.lambdaPt = 2.0e-3 beam.muxpx = -0.846574929020762 beam.muypy = 0.846574929020762 beam.mutpt = 0.0 diff --git a/examples/fodo_tune/run_fodo_tune.py b/examples/fodo_tune/run_fodo_tune.py index 00b6bcc5c..2315be15b 100755 --- a/examples/fodo_tune/run_fodo_tune.py +++ b/examples/fodo_tune/run_fodo_tune.py @@ -32,12 +32,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=3.9984884770e-5, - sigmaY=3.9984884770e-5, - sigmaT=1.0e-3, - sigmaPx=2.6623538760e-5, - sigmaPy=2.6623538760e-5, - sigmaPt=2.0e-3, + lambdaX=3.9984884770e-5, + lambdaY=3.9984884770e-5, + lambdaT=1.0e-3, + lambdaPx=2.6623538760e-5, + lambdaPy=2.6623538760e-5, + lambdaPt=2.0e-3, muxpx=-0.846574929020762, muypy=0.846574929020762, mutpt=0.0, diff --git a/examples/iota_lattice/input_iotalattice.in b/examples/iota_lattice/input_iotalattice.in index 64325fe5a..ae050598f 100644 --- a/examples/iota_lattice/input_iotalattice.in +++ b/examples/iota_lattice/input_iotalattice.in @@ -7,12 +7,12 @@ beam.kin_energy = 2.5 beam.charge = 1.0e-9 beam.particle = proton beam.distribution = waterbag -beam.sigmaX = 1.588960728035e-3 -beam.sigmaY = 2.496625268437e-3 -beam.sigmaT = 1.0e-3 -beam.sigmaPx = 2.8320397837724e-3 -beam.sigmaPy = 1.802433091137e-3 -beam.sigmaPt = 0.0 +beam.lambdaX = 1.588960728035e-3 +beam.lambdaY = 2.496625268437e-3 +beam.lambdaT = 1.0e-3 +beam.lambdaPx = 2.8320397837724e-3 +beam.lambdaPy = 1.802433091137e-3 +beam.lambdaPt = 0.0 beam.muxpx = 0.0 beam.muypy = 0.0 beam.mutpt = 0.0 diff --git a/examples/iota_lattice/input_iotalattice_sdep.in b/examples/iota_lattice/input_iotalattice_sdep.in index 815750479..450fc878c 100644 --- a/examples/iota_lattice/input_iotalattice_sdep.in +++ b/examples/iota_lattice/input_iotalattice_sdep.in @@ -7,12 +7,12 @@ beam.kin_energy = 2.5 beam.charge = 1.0e-9 beam.particle = proton beam.distribution = waterbag -beam.sigmaX = 1.865379469388e-003 -beam.sigmaY = 2.0192133150418e-003 -beam.sigmaT = 1.0e-3 -beam.sigmaPx = 1.402566720991e-003 -beam.sigmaPy = 9.57593913381e-004 -beam.sigmaPt = 0.0 +beam.lambdaX = 1.865379469388e-003 +beam.lambdaY = 2.0192133150418e-003 +beam.lambdaT = 1.0e-3 +beam.lambdaPx = 1.402566720991e-003 +beam.lambdaPy = 9.57593913381e-004 +beam.lambdaPt = 0.0 beam.muxpx = 0.482260919078473 beam.muypy = 0.762127656873158 beam.mutpt = 0.0 diff --git a/examples/iota_lattice/run_iotalattice.py b/examples/iota_lattice/run_iotalattice.py index d7b98a392..6cc6af2f0 100644 --- a/examples/iota_lattice/run_iotalattice.py +++ b/examples/iota_lattice/run_iotalattice.py @@ -30,12 +30,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=1.588960728035e-3, - sigmaY=2.496625268437e-3, - sigmaT=1.0e-3, - sigmaPx=2.8320397837724e-3, - sigmaPy=1.802433091137e-3, - sigmaPt=0.0, + lambdaX=1.588960728035e-3, + lambdaY=2.496625268437e-3, + lambdaT=1.0e-3, + lambdaPx=2.8320397837724e-3, + lambdaPy=1.802433091137e-3, + lambdaPt=0.0, ) sim.add_particles(bunch_charge_C, distr, npart) diff --git a/examples/iota_lattice/run_iotalattice_sdep.py b/examples/iota_lattice/run_iotalattice_sdep.py index 2daa85729..4e6a8e828 100644 --- a/examples/iota_lattice/run_iotalattice_sdep.py +++ b/examples/iota_lattice/run_iotalattice_sdep.py @@ -37,12 +37,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=1.865379469388e-003, - sigmaY=2.0192133150418e-003, - sigmaT=1.0e-3, - sigmaPx=1.402566720991e-003, - sigmaPy=9.57593913381e-004, - sigmaPt=0.0, + lambdaX=1.865379469388e-003, + lambdaY=2.0192133150418e-003, + lambdaT=1.0e-3, + lambdaPx=1.402566720991e-003, + lambdaPy=9.57593913381e-004, + lambdaPt=0.0, muxpx=0.482260919078473, muypy=0.762127656873158, mutpt=0.0, diff --git a/examples/iota_lens/input_iotalens.in b/examples/iota_lens/input_iotalens.in index f26f13797..8b44ac84c 100644 --- a/examples/iota_lens/input_iotalens.in +++ b/examples/iota_lens/input_iotalens.in @@ -7,12 +7,12 @@ beam.kin_energy = 2.5 beam.charge = 1.0e-9 beam.particle = proton beam.distribution = waterbag -beam.sigmaX = 2.0e-3 -beam.sigmaY = 2.0e-3 -beam.sigmaT = 1.0e-3 -beam.sigmaPx = 3.0e-4 -beam.sigmaPy = 3.0e-4 -beam.sigmaPt = 0.0 +beam.lambdaX = 2.0e-3 +beam.lambdaY = 2.0e-3 +beam.lambdaT = 1.0e-3 +beam.lambdaPx = 3.0e-4 +beam.lambdaPy = 3.0e-4 +beam.lambdaPt = 0.0 beam.muxpx = 0.0 beam.muypy = 0.0 beam.mutpt = 0.0 diff --git a/examples/iota_lens/input_iotalens_sdep.in b/examples/iota_lens/input_iotalens_sdep.in index 55ed2d454..c37968cb7 100644 --- a/examples/iota_lens/input_iotalens_sdep.in +++ b/examples/iota_lens/input_iotalens_sdep.in @@ -7,21 +7,21 @@ beam.kin_energy = 2.5 beam.charge = 1.0e-9 beam.particle = proton beam.distribution = waterbag -#beam.sigmaX = 2.0e-3 -#beam.sigmaY = 2.0e-3 -#beam.sigmaT = 1.0e-3 -#beam.sigmaPx = 3.0e-4 -#beam.sigmaPy = 3.0e-4 -#beam.sigmaPt = 0.0 +#beam.lambdaX = 2.0e-3 +#beam.lambdaY = 2.0e-3 +#beam.lambdaT = 1.0e-3 +#beam.lambdaPx = 3.0e-4 +#beam.lambdaPy = 3.0e-4 +#beam.lambdaPt = 0.0 #beam.muxpx = 0.0 #beam.muypy = 0.0 #beam.mutpt = 0.0 -beam.sigmaX = 1.397456296195e-003 -beam.sigmaY = 1.397456296195e-003 -beam.sigmaT = 1.0e-4 -beam.sigmaPx = 1.256184325020e-003 -beam.sigmaPy = 1.256184325020e-003 -beam.sigmaPt = 0.0 +beam.lambdaX = 1.397456296195e-003 +beam.lambdaY = 1.397456296195e-003 +beam.lambdaT = 1.0e-4 +beam.lambdaPx = 1.256184325020e-003 +beam.lambdaPy = 1.256184325020e-003 +beam.lambdaPt = 0.0 beam.muxpx = 0.8090169943749474 beam.muypy = 0.8090169943749474 beam.mutpt = 0.0 diff --git a/examples/iota_lens/run_iotalens.py b/examples/iota_lens/run_iotalens.py index a5dd9f5f5..7fa2b8946 100644 --- a/examples/iota_lens/run_iotalens.py +++ b/examples/iota_lens/run_iotalens.py @@ -33,12 +33,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=2.0e-3, - sigmaY=2.0e-3, - sigmaT=1.0e-3, - sigmaPx=3.0e-4, - sigmaPy=3.0e-4, - sigmaPt=0.0, + lambdaX=2.0e-3, + lambdaY=2.0e-3, + lambdaT=1.0e-3, + lambdaPx=3.0e-4, + lambdaPy=3.0e-4, + lambdaPt=0.0, ) sim.add_particles(bunch_charge_C, distr, npart) diff --git a/examples/iota_lens/run_iotalens_sdep.py b/examples/iota_lens/run_iotalens_sdep.py index e4b81b0a0..a4631424b 100644 --- a/examples/iota_lens/run_iotalens_sdep.py +++ b/examples/iota_lens/run_iotalens_sdep.py @@ -37,12 +37,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=1.397456296195e-003, - sigmaY=1.397456296195e-003, - sigmaT=1.0e-4, - sigmaPx=1.256184325020e-003, - sigmaPy=1.256184325020e-003, - sigmaPt=0.0, + lambdaX=1.397456296195e-003, + lambdaY=1.397456296195e-003, + lambdaT=1.0e-4, + lambdaPx=1.256184325020e-003, + lambdaPy=1.256184325020e-003, + lambdaPt=0.0, muxpx=0.8090169943749474, muypy=0.8090169943749474, mutpt=0.0, diff --git a/examples/kicker/README.rst b/examples/kicker/README.rst index 6531b4d47..72f88f8f3 100644 --- a/examples/kicker/README.rst +++ b/examples/kicker/README.rst @@ -9,7 +9,7 @@ We use a 2 GeV electron beam. The second beam moments should be unchanged, but the first beam moments corresponding to :math:`p_x` and :math:`p_y` should change according to the size of the kick. -In this test, the initial and final values of :math:`\sigma_x`, :math:`\sigma_y`, :math:`\sigma_t`, :math:`\epsilon_x`, :math:`\epsilon_y`, and :math:`\epsilon_t` must agree with nominal values. +In this test, the initial and final values of :math:`\lambda_x`, :math:`\lambda_y`, :math:`\lambda_t`, :math:`\epsilon_x`, :math:`\epsilon_y`, and :math:`\epsilon_t` must agree with nominal values. Run diff --git a/examples/kicker/input_kicker.in b/examples/kicker/input_kicker.in index 9214d4c79..dddf3787d 100644 --- a/examples/kicker/input_kicker.in +++ b/examples/kicker/input_kicker.in @@ -7,12 +7,12 @@ beam.kin_energy = 2.0e3 beam.charge = 1.0e-9 beam.particle = electron beam.distribution = waterbag -beam.sigmaX = 4.0e-3 -beam.sigmaY = 4.0e-3 -beam.sigmaT = 1.0e-3 -beam.sigmaPx = 3.0e-4 -beam.sigmaPy = 3.0e-4 -beam.sigmaPt = 2.0e-3 +beam.lambdaX = 4.0e-3 +beam.lambdaY = 4.0e-3 +beam.lambdaT = 1.0e-3 +beam.lambdaPx = 3.0e-4 +beam.lambdaPy = 3.0e-4 +beam.lambdaPt = 2.0e-3 beam.muxpx = 0.0 beam.muypy = 0.0 beam.mutpt = 0.0 diff --git a/examples/kicker/run_hvkicker_madx.py b/examples/kicker/run_hvkicker_madx.py index e69dc1eed..85b1ca658 100644 --- a/examples/kicker/run_hvkicker_madx.py +++ b/examples/kicker/run_hvkicker_madx.py @@ -30,12 +30,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=4.0e-3, - sigmaY=4.0e-3, - sigmaT=1.0e-3, - sigmaPx=3.0e-4, - sigmaPy=3.0e-4, - sigmaPt=2.0e-3, + lambdaX=4.0e-3, + lambdaY=4.0e-3, + lambdaT=1.0e-3, + lambdaPx=3.0e-4, + lambdaPy=3.0e-4, + lambdaPt=2.0e-3, ) sim.add_particles(bunch_charge_C, distr, npart) diff --git a/examples/kicker/run_kicker.py b/examples/kicker/run_kicker.py index b94b32882..94ea22682 100644 --- a/examples/kicker/run_kicker.py +++ b/examples/kicker/run_kicker.py @@ -31,12 +31,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=4.0e-3, - sigmaY=4.0e-3, - sigmaT=1.0e-3, - sigmaPx=3.0e-4, - sigmaPy=3.0e-4, - sigmaPt=2.0e-3, + lambdaX=4.0e-3, + lambdaY=4.0e-3, + lambdaT=1.0e-3, + lambdaPx=3.0e-4, + lambdaPy=3.0e-4, + lambdaPt=2.0e-3, ) sim.add_particles(bunch_charge_C, distr, npart) diff --git a/examples/kicker/run_kicker_madx.py b/examples/kicker/run_kicker_madx.py index ec3363bb0..b98d66b5e 100644 --- a/examples/kicker/run_kicker_madx.py +++ b/examples/kicker/run_kicker_madx.py @@ -30,12 +30,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=4.0e-3, - sigmaY=4.0e-3, - sigmaT=1.0e-3, - sigmaPx=3.0e-4, - sigmaPy=3.0e-4, - sigmaPt=2.0e-3, + lambdaX=4.0e-3, + lambdaY=4.0e-3, + lambdaT=1.0e-3, + lambdaPx=3.0e-4, + lambdaPy=3.0e-4, + lambdaPt=2.0e-3, ) sim.add_particles(bunch_charge_C, distr, npart) diff --git a/examples/kurth/README.rst b/examples/kurth/README.rst index 246055496..8f9ef9308 100644 --- a/examples/kurth/README.rst +++ b/examples/kurth/README.rst @@ -14,7 +14,7 @@ in all three phase planes. The particle distribution should remain unchanged, to within the level expected due to numerical particle noise. This is tested using the second moments of the distribution. -In this test, the initial and final values of :math:`\sigma_x`, :math:`\sigma_y`, :math:`\sigma_t`, :math:`\epsilon_x`, :math:`\epsilon_y`, and :math:`\epsilon_t` must agree with nominal values. +In this test, the initial and final values of :math:`\lambda_x`, :math:`\lambda_y`, :math:`\lambda_t`, :math:`\epsilon_x`, :math:`\epsilon_y`, and :math:`\epsilon_t` must agree with nominal values. Run @@ -71,7 +71,7 @@ phase advance from 121 degrees to 74 degrees. The particle distribution should remain unchanged, to within the level expected due to numerical particle noise. This is tested using the second moments of the distribution. -In this test, the initial and final values of :math:`\sigma_x`, :math:`\sigma_y`, :math:`\sigma_t`, :math:`\epsilon_x`, :math:`\epsilon_y`, and :math:` +In this test, the initial and final values of :math:`\lambda_x`, :math:`\lambda_y`, :math:`\lambda_t`, :math:`\epsilon_x`, :math:`\epsilon_y`, and :math:` Run diff --git a/examples/kurth/input_kurth_10nC_periodic.in b/examples/kurth/input_kurth_10nC_periodic.in index 5cccabd6f..8e3f15bac 100644 --- a/examples/kurth/input_kurth_10nC_periodic.in +++ b/examples/kurth/input_kurth_10nC_periodic.in @@ -8,12 +8,12 @@ beam.kin_energy = 2.0e3 beam.charge = 1.0e-8 beam.particle = proton beam.distribution = kurth6d -beam.sigmaX = 1.46e-3 -beam.sigmaY = 1.46e-3 -beam.sigmaT = 4.9197638312420749e-4 -beam.sigmaPx = 6.84931506849e-4 -beam.sigmaPy = 6.84931506849e-4 -beam.sigmaPt = 2.0326178944803812e-3 +beam.lambdaX = 1.46e-3 +beam.lambdaY = 1.46e-3 +beam.lambdaT = 4.9197638312420749e-4 +beam.lambdaPx = 6.84931506849e-4 +beam.lambdaPy = 6.84931506849e-4 +beam.lambdaPt = 2.0326178944803812e-3 ############################################################################### diff --git a/examples/kurth/input_kurth_periodic.in b/examples/kurth/input_kurth_periodic.in index 41297e29b..2af0f6a4f 100644 --- a/examples/kurth/input_kurth_periodic.in +++ b/examples/kurth/input_kurth_periodic.in @@ -7,12 +7,12 @@ beam.kin_energy = 2.0e3 beam.charge = 1.0e-8 beam.particle = proton beam.distribution = kurth6d -beam.sigmaX = 1.11e-3 -beam.sigmaY = 1.11e-3 -beam.sigmaT = 3.74036839224568e-4 -beam.sigmaPx = 9.00900900901e-4 -beam.sigmaPy = 9.00900900901e-4 -beam.sigmaPt = 2.6735334467940146e-3 +beam.lambdaX = 1.11e-3 +beam.lambdaY = 1.11e-3 +beam.lambdaT = 3.74036839224568e-4 +beam.lambdaPx = 9.00900900901e-4 +beam.lambdaPy = 9.00900900901e-4 +beam.lambdaPt = 2.6735334467940146e-3 ############################################################################### diff --git a/examples/kurth/run_kurth_10nC_periodic.py b/examples/kurth/run_kurth_10nC_periodic.py index d04cfedbd..b819a8ecb 100755 --- a/examples/kurth/run_kurth_10nC_periodic.py +++ b/examples/kurth/run_kurth_10nC_periodic.py @@ -33,12 +33,12 @@ # particle bunch distr = distribution.Kurth6D( - sigmaX=1.46e-3, - sigmaY=1.46e-3, - sigmaT=4.9197638312420749e-4, - sigmaPx=6.84931506849e-4, - sigmaPy=6.84931506849e-4, - sigmaPt=2.0326178944803812e-3, + lambdaX=1.46e-3, + lambdaY=1.46e-3, + lambdaT=4.9197638312420749e-4, + lambdaPx=6.84931506849e-4, + lambdaPy=6.84931506849e-4, + lambdaPt=2.0326178944803812e-3, ) sim.add_particles(bunch_charge_C, distr, npart) diff --git a/examples/kurth/run_kurth_periodic.py b/examples/kurth/run_kurth_periodic.py index c5b13e2d9..1d4d45aa1 100755 --- a/examples/kurth/run_kurth_periodic.py +++ b/examples/kurth/run_kurth_periodic.py @@ -32,12 +32,12 @@ # particle bunch distr = distribution.Kurth6D( - sigmaX=1.11e-3, - sigmaY=1.11e-3, - sigmaT=3.74036839224568e-4, - sigmaPx=9.00900900901e-4, - sigmaPy=9.00900900901e-4, - sigmaPt=2.6735334467940146e-3, + lambdaX=1.11e-3, + lambdaY=1.11e-3, + lambdaT=3.74036839224568e-4, + lambdaPx=9.00900900901e-4, + lambdaPy=9.00900900901e-4, + lambdaPt=2.6735334467940146e-3, ) sim.add_particles(bunch_charge_C, distr, npart) diff --git a/examples/multipole/input_multipole.in b/examples/multipole/input_multipole.in index 3797c4bce..93e452d4e 100644 --- a/examples/multipole/input_multipole.in +++ b/examples/multipole/input_multipole.in @@ -7,12 +7,12 @@ beam.kin_energy = 2.0e3 beam.charge = 1.0e-9 beam.particle = electron beam.distribution = waterbag -beam.sigmaX = 4.0e-3 -beam.sigmaY = 4.0e-3 -beam.sigmaT = 1.0e-3 -beam.sigmaPx = 3.0e-4 -beam.sigmaPy = 3.0e-4 -beam.sigmaPt = 2.0e-3 +beam.lambdaX = 4.0e-3 +beam.lambdaY = 4.0e-3 +beam.lambdaT = 1.0e-3 +beam.lambdaPx = 3.0e-4 +beam.lambdaPy = 3.0e-4 +beam.lambdaPt = 2.0e-3 beam.muxpx = 0.0 beam.muypy = 0.0 beam.mutpt = 0.0 diff --git a/examples/multipole/run_multipole.py b/examples/multipole/run_multipole.py index 2f9ead1cf..656f751cb 100644 --- a/examples/multipole/run_multipole.py +++ b/examples/multipole/run_multipole.py @@ -31,12 +31,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=4.0e-3, - sigmaY=4.0e-3, - sigmaT=1.0e-3, - sigmaPx=3.0e-4, - sigmaPy=3.0e-4, - sigmaPt=2.0e-3, + lambdaX=4.0e-3, + lambdaY=4.0e-3, + lambdaT=1.0e-3, + lambdaPx=3.0e-4, + lambdaPy=3.0e-4, + lambdaPt=2.0e-3, ) sim.add_particles(bunch_charge_C, distr, npart) diff --git a/examples/positron_channel/input_positron.in b/examples/positron_channel/input_positron.in index b1d6eed20..c552ca0c7 100644 --- a/examples/positron_channel/input_positron.in +++ b/examples/positron_channel/input_positron.in @@ -7,12 +7,12 @@ beam.kin_energy = 10.0e3 beam.charge = 190.0e-12 beam.particle = positron beam.distribution = triangle -beam.sigmaX = 5.054566450e-6 -beam.sigmaY = 5.054566450e-6 -beam.sigmaT = 8.43732950e-7 -beam.sigmaPx = 1.01091329e-7 -beam.sigmaPy = 1.01091329e-7 -beam.sigmaPt = 1.0e-2 +beam.lambdaX = 5.054566450e-6 +beam.lambdaY = 5.054566450e-6 +beam.lambdaT = 8.43732950e-7 +beam.lambdaPx = 1.01091329e-7 +beam.lambdaPy = 1.01091329e-7 +beam.lambdaPt = 1.0e-2 beam.muxpx = 0.0 beam.muypy = 0.0 beam.mutpt = 0.995037190209989 diff --git a/examples/positron_channel/run_positron.py b/examples/positron_channel/run_positron.py index b524b5b63..41e84b8f6 100755 --- a/examples/positron_channel/run_positron.py +++ b/examples/positron_channel/run_positron.py @@ -31,12 +31,12 @@ # particle bunch distr = distribution.Triangle( - sigmaX=5.054566450e-6, - sigmaY=5.054566450e-6, - sigmaT=8.43732950e-7, - sigmaPx=1.01091329e-7, - sigmaPy=1.01091329e-7, - sigmaPt=1.0e-2, + lambdaX=5.054566450e-6, + lambdaY=5.054566450e-6, + lambdaT=8.43732950e-7, + lambdaPx=1.01091329e-7, + lambdaPy=1.01091329e-7, + lambdaPt=1.0e-2, muxpx=0.0, muypy=0.0, mutpt=0.995037190209989, diff --git a/examples/pytorch_surrogate_model/run_ml_surrogate_15_stage.py b/examples/pytorch_surrogate_model/run_ml_surrogate_15_stage.py index 67e0487d4..0a6101148 100644 --- a/examples/pytorch_surrogate_model/run_ml_surrogate_15_stage.py +++ b/examples/pytorch_surrogate_model/run_ml_surrogate_15_stage.py @@ -129,12 +129,12 @@ def download_and_unzip(url, data_dir): pc = sim.particle_container() distr = distribution.Gaussian( - sigmaX=0.75e-6, - sigmaY=0.75e-6, - sigmaT=0.1e-6, - sigmaPx=1.33 / energy_gamma, - sigmaPy=1.33 / energy_gamma, - sigmaPt=1e-8, + lambdaX=0.75e-6, + lambdaY=0.75e-6, + lambdaT=0.1e-6, + lambdaPx=1.33 / energy_gamma, + lambdaPy=1.33 / energy_gamma, + lambdaPt=1e-8, muxpx=0.0, muypy=0.0, mutpt=0.0, diff --git a/examples/quadrupole_softedge/input_quadrupole_softedge.in b/examples/quadrupole_softedge/input_quadrupole_softedge.in index 30e5fac16..b3fc60891 100644 --- a/examples/quadrupole_softedge/input_quadrupole_softedge.in +++ b/examples/quadrupole_softedge/input_quadrupole_softedge.in @@ -7,12 +7,12 @@ beam.kin_energy = 2.0e3 beam.charge = 1.0e-9 beam.particle = electron beam.distribution = waterbag -beam.sigmaX = 3.9984884770e-5 -beam.sigmaY = 3.9984884770e-5 -beam.sigmaT = 1.0e-3 -beam.sigmaPx = 2.6623538760e-5 -beam.sigmaPy = 2.6623538760e-5 -beam.sigmaPt = 2.0e-3 +beam.lambdaX = 3.9984884770e-5 +beam.lambdaY = 3.9984884770e-5 +beam.lambdaT = 1.0e-3 +beam.lambdaPx = 2.6623538760e-5 +beam.lambdaPy = 2.6623538760e-5 +beam.lambdaPt = 2.0e-3 beam.muxpx = -0.846574929020762 beam.muypy = 0.846574929020762 beam.mutpt = 0.0 diff --git a/examples/quadrupole_softedge/run_quadrupole_softedge.py b/examples/quadrupole_softedge/run_quadrupole_softedge.py index 55e488465..055d19080 100755 --- a/examples/quadrupole_softedge/run_quadrupole_softedge.py +++ b/examples/quadrupole_softedge/run_quadrupole_softedge.py @@ -31,12 +31,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=3.9984884770e-5, - sigmaY=3.9984884770e-5, - sigmaT=1.0e-3, - sigmaPx=2.6623538760e-5, - sigmaPy=2.6623538760e-5, - sigmaPt=2.0e-3, + lambdaX=3.9984884770e-5, + lambdaY=3.9984884770e-5, + lambdaT=1.0e-3, + lambdaPx=2.6623538760e-5, + lambdaPy=2.6623538760e-5, + lambdaPt=2.0e-3, muxpx=-0.846574929020762, muypy=0.846574929020762, mutpt=0.0, diff --git a/examples/rfcavity/README.rst b/examples/rfcavity/README.rst index 64e0696fd..f5bc10227 100644 --- a/examples/rfcavity/README.rst +++ b/examples/rfcavity/README.rst @@ -14,7 +14,7 @@ https://github.com/impact-lbl/IMPACT-Z/tree/master/examples/Example2 The final target beam energy and beam moments are based on simulation in IMPACT-Z, without space charge. -In this test, the initial and final values of :math:`\sigma_x`, :math:`\sigma_y`, :math:`\sigma_t`, :math:`\epsilon_x`, :math:`\epsilon_y`, and :math:`\epsilon_t` must agree with nominal values. +In this test, the initial and final values of :math:`\lambda_x`, :math:`\lambda_y`, :math:`\lambda_t`, :math:`\epsilon_x`, :math:`\epsilon_y`, and :math:`\epsilon_t` must agree with nominal values. Run diff --git a/examples/rfcavity/input_rfcavity.in b/examples/rfcavity/input_rfcavity.in index dcd41e724..cec21bc14 100644 --- a/examples/rfcavity/input_rfcavity.in +++ b/examples/rfcavity/input_rfcavity.in @@ -7,12 +7,12 @@ beam.kin_energy = 230 beam.charge = 1.0e-10 beam.particle = electron beam.distribution = waterbag -beam.sigmaX = 0.352498964601e-3 -beam.sigmaY = 0.207443478142e-3 -beam.sigmaT = 0.70399950746e-4 -beam.sigmaPx = 5.161852770e-6 -beam.sigmaPy = 9.163582894e-6 -beam.sigmaPt = 0.260528852031e-3 +beam.lambdaX = 0.352498964601e-3 +beam.lambdaY = 0.207443478142e-3 +beam.lambdaT = 0.70399950746e-4 +beam.lambdaPx = 5.161852770e-6 +beam.lambdaPy = 9.163582894e-6 +beam.lambdaPt = 0.260528852031e-3 beam.muxpx = 0.5712386101751441 beam.muypy = -0.514495755427526 beam.mutpt = -5.05773e-10 diff --git a/examples/rfcavity/run_rfcavity.py b/examples/rfcavity/run_rfcavity.py index bceb8499c..acdba68b4 100755 --- a/examples/rfcavity/run_rfcavity.py +++ b/examples/rfcavity/run_rfcavity.py @@ -32,12 +32,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=0.352498964601e-3, - sigmaY=0.207443478142e-3, - sigmaT=0.70399950746e-4, - sigmaPx=5.161852770e-6, - sigmaPy=9.163582894e-6, - sigmaPt=0.260528852031e-3, + lambdaX=0.352498964601e-3, + lambdaY=0.207443478142e-3, + lambdaT=0.70399950746e-4, + lambdaPx=5.161852770e-6, + lambdaPy=9.163582894e-6, + lambdaPt=0.260528852031e-3, muxpx=0.5712386101751441, muypy=-0.514495755427526, mutpt=-5.05773e-10, diff --git a/examples/rotation/input_rotation.in b/examples/rotation/input_rotation.in index a1a27a0e4..b8a786b2f 100644 --- a/examples/rotation/input_rotation.in +++ b/examples/rotation/input_rotation.in @@ -7,12 +7,12 @@ beam.kin_energy = 2.0e3 beam.charge = 1.0e-9 beam.particle = electron beam.distribution = waterbag -beam.sigmaX = 4.0e-3 -beam.sigmaY = 4.0e-3 -beam.sigmaT = 1.0e-3 -beam.sigmaPx = 3.0e-4 -beam.sigmaPy = 3.0e-4 -beam.sigmaPt = 2.0e-3 +beam.lambdaX = 4.0e-3 +beam.lambdaY = 4.0e-3 +beam.lambdaT = 1.0e-3 +beam.lambdaPx = 3.0e-4 +beam.lambdaPy = 3.0e-4 +beam.lambdaPt = 2.0e-3 ############################################################################### diff --git a/examples/rotation/run_rotation.py b/examples/rotation/run_rotation.py index fafe40895..a1257b302 100644 --- a/examples/rotation/run_rotation.py +++ b/examples/rotation/run_rotation.py @@ -31,12 +31,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=4.0e-3, - sigmaY=4.0e-3, - sigmaT=1.0e-3, - sigmaPx=3.0e-4, - sigmaPy=3.0e-4, - sigmaPt=2.0e-3, + lambdaX=4.0e-3, + lambdaY=4.0e-3, + lambdaT=1.0e-3, + lambdaPx=3.0e-4, + lambdaPy=3.0e-4, + lambdaPt=2.0e-3, ) sim.add_particles(bunch_charge_C, distr, npart) diff --git a/examples/solenoid/input_solenoid.in b/examples/solenoid/input_solenoid.in index 66c7cfed0..761f5a156 100644 --- a/examples/solenoid/input_solenoid.in +++ b/examples/solenoid/input_solenoid.in @@ -7,12 +7,12 @@ beam.kin_energy = 250.0 beam.charge = 1.0e-9 beam.particle = proton beam.distribution = waterbag -beam.sigmaX = 1.559531175539e-3 -beam.sigmaY = 2.205510139392e-3 -beam.sigmaT = 1.0e-3 -beam.sigmaPx = 6.41218345413e-4 -beam.sigmaPy = 9.06819680526e-4 -beam.sigmaPt = 1.0e-3 +beam.lambdaX = 1.559531175539e-3 +beam.lambdaY = 2.205510139392e-3 +beam.lambdaT = 1.0e-3 +beam.lambdaPx = 6.41218345413e-4 +beam.lambdaPy = 9.06819680526e-4 +beam.lambdaPt = 1.0e-3 beam.muxpx = 0.0 beam.muypy = 0.0 beam.mutpt = 0.0 diff --git a/examples/solenoid/run_solenoid.py b/examples/solenoid/run_solenoid.py index 251ce402d..78f02100a 100755 --- a/examples/solenoid/run_solenoid.py +++ b/examples/solenoid/run_solenoid.py @@ -32,12 +32,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=1.559531175539e-3, - sigmaY=2.205510139392e-3, - sigmaT=1.0e-3, - sigmaPx=6.41218345413e-4, - sigmaPy=9.06819680526e-4, - sigmaPt=1.0e-3, + lambdaX=1.559531175539e-3, + lambdaY=2.205510139392e-3, + lambdaT=1.0e-3, + lambdaPx=6.41218345413e-4, + lambdaPy=9.06819680526e-4, + lambdaPt=1.0e-3, ) sim.add_particles(bunch_charge_C, distr, npart) diff --git a/examples/solenoid/run_solenoid_madx.py b/examples/solenoid/run_solenoid_madx.py index 2060dff68..7eea6cbc2 100755 --- a/examples/solenoid/run_solenoid_madx.py +++ b/examples/solenoid/run_solenoid_madx.py @@ -30,12 +30,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=1.559531175539e-3, - sigmaY=2.205510139392e-3, - sigmaT=1.0e-3, - sigmaPx=6.41218345413e-4, - sigmaPy=9.06819680526e-4, - sigmaPt=1.0e-3, + lambdaX=1.559531175539e-3, + lambdaY=2.205510139392e-3, + lambdaT=1.0e-3, + lambdaPx=6.41218345413e-4, + lambdaPy=9.06819680526e-4, + lambdaPt=1.0e-3, ) sim.add_particles(bunch_charge_C, distr, npart) diff --git a/examples/solenoid_softedge/input_solenoid_softedge.in b/examples/solenoid_softedge/input_solenoid_softedge.in index d6088592f..d223a721e 100644 --- a/examples/solenoid_softedge/input_solenoid_softedge.in +++ b/examples/solenoid_softedge/input_solenoid_softedge.in @@ -7,12 +7,12 @@ beam.kin_energy = 250.0 beam.charge = 1.0e-9 beam.particle = proton beam.distribution = waterbag -beam.sigmaX = 1.559531175539e-3 -beam.sigmaY = 2.205510139392e-3 -beam.sigmaT = 1.0e-3 -beam.sigmaPx = 6.41218345413e-4 -beam.sigmaPy = 9.06819680526e-4 -beam.sigmaPt = 1.0e-3 +beam.lambdaX = 1.559531175539e-3 +beam.lambdaY = 2.205510139392e-3 +beam.lambdaT = 1.0e-3 +beam.lambdaPx = 6.41218345413e-4 +beam.lambdaPy = 9.06819680526e-4 +beam.lambdaPt = 1.0e-3 beam.muxpx = 0.0 beam.muypy = 0.0 beam.mutpt = 0.0 diff --git a/examples/solenoid_softedge/run_solenoid_softedge.py b/examples/solenoid_softedge/run_solenoid_softedge.py index 595cc0387..0d93a7f31 100755 --- a/examples/solenoid_softedge/run_solenoid_softedge.py +++ b/examples/solenoid_softedge/run_solenoid_softedge.py @@ -32,12 +32,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=1.559531175539e-3, - sigmaY=2.205510139392e-3, - sigmaT=1.0e-3, - sigmaPx=6.41218345413e-4, - sigmaPy=9.06819680526e-4, - sigmaPt=1.0e-3, + lambdaX=1.559531175539e-3, + lambdaY=2.205510139392e-3, + lambdaT=1.0e-3, + lambdaPx=6.41218345413e-4, + lambdaPy=9.06819680526e-4, + lambdaPt=1.0e-3, ) sim.add_particles(bunch_charge_C, distr, npart) diff --git a/examples/thin_dipole/input_thin_dipole.in b/examples/thin_dipole/input_thin_dipole.in index 6bbec0a48..e78934484 100644 --- a/examples/thin_dipole/input_thin_dipole.in +++ b/examples/thin_dipole/input_thin_dipole.in @@ -7,12 +7,12 @@ beam.kin_energy = 5.0 beam.charge = 1.0e-9 beam.particle = proton beam.distribution = waterbag -beam.sigmaX = 1.0e-3 -beam.sigmaY = 1.0e-3 -beam.sigmaT = 0.3 -beam.sigmaPx = 2.0e-4 -beam.sigmaPy = 2.0e-4 -beam.sigmaPt = 2.0e-4 +beam.lambdaX = 1.0e-3 +beam.lambdaY = 1.0e-3 +beam.lambdaT = 0.3 +beam.lambdaPx = 2.0e-4 +beam.lambdaPy = 2.0e-4 +beam.lambdaPt = 2.0e-4 beam.muxpx = 0.0 beam.muypy = 0.0 beam.mutpt = 0.0 diff --git a/examples/thin_dipole/run_thin_dipole.py b/examples/thin_dipole/run_thin_dipole.py index e767bf104..e29b320e7 100755 --- a/examples/thin_dipole/run_thin_dipole.py +++ b/examples/thin_dipole/run_thin_dipole.py @@ -30,12 +30,12 @@ # particle bunch distr = distribution.Waterbag( - sigmaX=1.0e-3, - sigmaY=1.0e-3, - sigmaT=0.3, - sigmaPx=2.0e-4, - sigmaPy=2.0e-4, - sigmaPt=2.0e-4, + lambdaX=1.0e-3, + lambdaY=1.0e-3, + lambdaT=0.3, + lambdaPx=2.0e-4, + lambdaPy=2.0e-4, + lambdaPt=2.0e-4, muxpx=-0.0, muypy=0.0, mutpt=0.0, diff --git a/src/initialization/InitDistribution.H b/src/initialization/InitDistribution.H index cccefc681..39d082718 100644 --- a/src/initialization/InitDistribution.H +++ b/src/initialization/InitDistribution.H @@ -103,16 +103,16 @@ namespace impactx::initialization /** Initialize the input parameters for all distributions that read phase space ellipse parameters from the input * * This function sets the distribution parameters based on the provided phase space inputs. - * The parameters include the phase space ellipse intersections for position (`sigmaX`, `sigmaY`), time (`sigmaT`), - * momentum (`sigmaPx`, `sigmaPy`) and energy (`sigmaPt`), as well as the correlation terms (`muxpx`, `muypy`, `mutpt`). + * The parameters include the phase space ellipse intersections for position (`lambdaX`, `lambdaY`), time (`lambdaT`), + * momentum (`lambdaPx`, `lambdaPy`) and energy (`lambdaPt`), as well as the correlation terms (`muxpx`, `muypy`, `mutpt`). * * @param pp_dist The parameter parser object. - * @param sigx Reference to the variable storing the axis intersection of the phase space ellipse for x position. - * @param sigy Reference to the variable storing the axis intersection of the phase space ellipse for y position. - * @param sigt Reference to the variable storing the axis intersection of the phase space ellipse for time. - * @param sigpx Reference to the variable storing the axis intersection of the phase space ellipse for momentum in x direction. - * @param sigpy Reference to the variable storing the axis intersection of the phase space ellipse for momentum in y direction. - * @param sigpt Reference to the variable storing the axis intersection of the phase space ellipse for energy. + * @param lambdax Reference to the variable storing the axis intersection of the phase space ellipse for x position. + * @param lambday Reference to the variable storing the axis intersection of the phase space ellipse for y position. + * @param lambdat Reference to the variable storing the axis intersection of the phase space ellipse for time. + * @param lambdapx Reference to the variable storing the axis intersection of the phase space ellipse for momentum in x direction. + * @param lambdapy Reference to the variable storing the axis intersection of the phase space ellipse for momentum in y direction. + * @param lambdapt Reference to the variable storing the axis intersection of the phase space ellipse for energy. * @param muxpx Reference to the variable storing the mean for momentum in x direction. * @param muypy Reference to the variable storing the mean for momentum in y direction. * @param mutpt Reference to the variable storing the mean for energy. @@ -120,8 +120,8 @@ namespace impactx::initialization void set_distribution_parameters_from_phase_space_inputs ( amrex::ParmParse const & pp_dist, - amrex::ParticleReal& sigx, amrex::ParticleReal& sigy, amrex::ParticleReal& sigt, - amrex::ParticleReal& sigpx,amrex::ParticleReal& sigpy, amrex::ParticleReal& sigpt, + amrex::ParticleReal& lambdax, amrex::ParticleReal& lambday, amrex::ParticleReal& lambdat, + amrex::ParticleReal& lambdapx,amrex::ParticleReal& lambdapy, amrex::ParticleReal& lambdapt, amrex::ParticleReal& muxpx, amrex::ParticleReal& muypy, amrex::ParticleReal& mutpt ); @@ -129,15 +129,15 @@ namespace impactx::initialization /** Set the distribution parameters from Twiss inputs * * This function reads Courant-Snyder / Twiss parameters from the provided `ParmParse` object and calculates the distribution parameters for a particle beam. - * It sets the values for the axis intercepts of the phase space ellipse (`sigmaX`, `sigmaY`, `sigmaT`, and `sigmaPx`, `sigmaPy`, `sigmaPt`) and correlation terms (`muxpx`, `muypy`, `mutpt`) normally accepted as input. + * It sets the values for the axis intercepts of the phase space ellipse (`lambdaX`, `lambdaY`, `lambdaT`, and `lambdaPx`, `lambdaPy`, `lambdaPt`) and correlation terms (`muxpx`, `muypy`, `mutpt`) normally accepted as input. * * @param pp_dist The parameter parser object. - * @param sigx Reference to the variable storing the axis intersection of the phase space ellipse for x position. - * @param sigy Reference to the variable storing the axis intersection of the phase space ellipse for y position. - * @param sigt Reference to the variable storing the axis intersection of the phase space ellipse for time. - * @param sigpx Reference to the variable storing the axis intersection of the phase space ellipse for momentum in x direction. - * @param sigpy Reference to the variable storing the axis intersection of the phase space ellipse for momentum in y direction. - * @param sigpt Reference to the variable storing the axis intersection of the phase space ellipse for energy. + * @param lambdax Reference to the variable storing the axis intersection of the phase space ellipse for x position. + * @param lambday Reference to the variable storing the axis intersection of the phase space ellipse for y position. + * @param lambdat Reference to the variable storing the axis intersection of the phase space ellipse for time. + * @param lambdapx Reference to the variable storing the axis intersection of the phase space ellipse for momentum in x direction. + * @param lambdapy Reference to the variable storing the axis intersection of the phase space ellipse for momentum in y direction. + * @param lambdapt Reference to the variable storing the axis intersection of the phase space ellipse for energy. * @param muxpx Reference to the variable storing the mean for momentum in x direction. * @param muypy Reference to the variable storing the mean for momentum in y direction. * @param mutpt Reference to the variable storing the mean for energy. @@ -145,8 +145,8 @@ namespace impactx::initialization void set_distribution_parameters_from_twiss_inputs ( amrex::ParmParse const & pp_dist, - amrex::ParticleReal& sigx, amrex::ParticleReal& sigy, amrex::ParticleReal& sigt, - amrex::ParticleReal& sigpx,amrex::ParticleReal& sigpy, amrex::ParticleReal& sigpt, + amrex::ParticleReal& lambdax, amrex::ParticleReal& lambday, amrex::ParticleReal& lambdat, + amrex::ParticleReal& lambdapx,amrex::ParticleReal& lambdapy, amrex::ParticleReal& lambdapt, amrex::ParticleReal& muxpx, amrex::ParticleReal& muypy, amrex::ParticleReal& mutpt ); diff --git a/src/initialization/InitDistribution.cpp b/src/initialization/InitDistribution.cpp index 9c7de5596..f3a564ff8 100644 --- a/src/initialization/InitDistribution.cpp +++ b/src/initialization/InitDistribution.cpp @@ -166,24 +166,24 @@ namespace impactx for (size_t i = 0; i < alphas.size(); i++) gammas.push_back((1.0 + std::pow(alphas.at(i), 2)) / betas.at(i)); - amrex::Vector sigmas_pos; - amrex::Vector sigmas_mom; + amrex::Vector lambdas_pos; + amrex::Vector lambdas_mom; amrex::Vector correlations; // calculate intersections of phase space ellipse with coordinate axes and the correlation factors for (size_t k = 0; k < betas.size(); k++){ - sigmas_pos.push_back(std::sqrt(emittances.at(k)/gammas.at(k))); - sigmas_mom.push_back(std::sqrt(emittances.at(k)/betas.at(k))); + lambdas_pos.push_back(std::sqrt(emittances.at(k)/gammas.at(k))); + lambdas_mom.push_back(std::sqrt(emittances.at(k)/betas.at(k))); correlations.push_back(alphas.at(k) / std::sqrt(betas.at(k) * gammas.at(k))); } - sigx = sigmas_pos.at(0); - sigy = sigmas_pos.at(1); - sigt = sigmas_pos.at(2); - sigpx = sigmas_mom.at(0); - sigpy = sigmas_mom.at(1); - sigpt = sigmas_mom.at(2); + sigx = lambdas_pos.at(0); + sigy = lambdas_pos.at(1); + sigt = lambdas_pos.at(2); + sigpx = lambdas_mom.at(0); + sigpy = lambdas_mom.at(1); + sigpt = lambdas_mom.at(2); muxpx = correlations.at(0); muypy = correlations.at(1); mutpt = correlations.at(2); @@ -196,12 +196,12 @@ namespace impactx amrex::ParticleReal& muxpx, amrex::ParticleReal& muypy, amrex::ParticleReal& mutpt ) { - pp_dist.get("sigmaX", sigx); - pp_dist.get("sigmaY", sigy); - pp_dist.get("sigmaT", sigt); - pp_dist.get("sigmaPx", sigpx); - pp_dist.get("sigmaPy", sigpy); - pp_dist.get("sigmaPt", sigpt); + pp_dist.get("lambdaX", sigx); + pp_dist.get("lambdaY", sigy); + pp_dist.get("lambdaT", sigt); + pp_dist.get("lambdaPx", sigpx); + pp_dist.get("lambdaPy", sigpy); + pp_dist.get("lambdaPt", sigpt); pp_dist.query("muxpx", muxpx); pp_dist.query("muypy", muypy); pp_dist.query("mutpt", mutpt); diff --git a/src/particles/distribution/Gaussian.H b/src/particles/distribution/Gaussian.H index 89ceb5479..d6baf9640 100644 --- a/src/particles/distribution/Gaussian.H +++ b/src/particles/distribution/Gaussian.H @@ -28,24 +28,24 @@ namespace impactx::distribution * * Return sampling from a 6D Gaussian distribution. * - * @param sigx,sigy,sigt for zero correlation, these are the related - * RMS sizes (in meters) - * @param sigpx,sigpy,sigpt RMS momentum + * @param lambdax,lambday,lambdat phase space axis intercepts (position); + * for zero correlation, these are the related RMS sizes (in meters) + * @param lambdapx,lambdapy,lambdapt phase space axis intercepts (momentum) * @param muxpx,muypy,mutpt correlation length-momentum */ Gaussian ( - amrex::ParticleReal sigx, - amrex::ParticleReal sigy, - amrex::ParticleReal sigt, - amrex::ParticleReal sigpx, - amrex::ParticleReal sigpy, - amrex::ParticleReal sigpt, + amrex::ParticleReal lambdax, + amrex::ParticleReal lambday, + amrex::ParticleReal lambdat, + amrex::ParticleReal lambdapx, + amrex::ParticleReal lambdapy, + amrex::ParticleReal lambdapt, amrex::ParticleReal muxpx=0.0, amrex::ParticleReal muypy=0.0, amrex::ParticleReal mutpt=0.0 ) - : m_sigmaX(sigx), m_sigmaY(sigy), m_sigmaT(sigt), m_sigmaPx(sigpx), m_sigmaPy(sigpy), - m_sigmaPt(sigpt), m_muxpx(muxpx), m_muypy(muypy), m_mutpt(mutpt) + : m_lambdaX(lambdax), m_lambdaY(lambday), m_lambdaT(lambdat), m_lambdaPx(lambdapx), m_lambdaPy(lambdapy), + m_lambdaPt(lambdapt), m_muxpx(muxpx), m_muypy(muypy), m_mutpt(mutpt) { } @@ -118,25 +118,25 @@ namespace impactx::distribution // Transform to produce the desired second moments/correlations: root = sqrt(1.0_prt-m_muxpx*m_muxpx); - a1 = m_sigmaX*x/root; - a2 = m_sigmaPx*(-m_muxpx*x/root+px); + a1 = m_lambdaX * x / root; + a2 = m_lambdaPx * (-m_muxpx * x / root + px); x = a1; px = a2; root = sqrt(1.0_prt-m_muypy*m_muypy); - a1 = m_sigmaY*y/root; - a2 = m_sigmaPy*(-m_muypy*y/root+py); + a1 = m_lambdaY * y / root; + a2 = m_lambdaPy * (-m_muypy * y / root + py); y = a1; py = a2; root = sqrt(1.0_prt-m_mutpt*m_mutpt); - a1 = m_sigmaT*t/root; - a2 = m_sigmaPt*(-m_mutpt*t/root+pt); + a1 = m_lambdaT * t / root; + a2 = m_lambdaPt * (-m_mutpt * t / root + pt); t = a1; pt = a2; } private: - amrex::ParticleReal m_sigmaX, m_sigmaY, m_sigmaT; //! related RMS sizes (length) - amrex::ParticleReal m_sigmaPx, m_sigmaPy, m_sigmaPt; //! RMS momentum + amrex::ParticleReal m_lambdaX, m_lambdaY, m_lambdaT; //! related position axis intercepts (length) of the phase space ellipse + amrex::ParticleReal m_lambdaPx, m_lambdaPy, m_lambdaPt; //! related momentum axis intercepts of the phase space ellipse amrex::ParticleReal m_muxpx, m_muypy, m_mutpt; //! correlation length-momentum }; diff --git a/src/particles/distribution/KVdist.H b/src/particles/distribution/KVdist.H index 3a9b3eb46..87e343399 100644 --- a/src/particles/distribution/KVdist.H +++ b/src/particles/distribution/KVdist.H @@ -29,24 +29,24 @@ namespace impactx::distribution * * Return sampling from a K-V + uniform distribution. * - * @param sigx,sigy,sigt for zero correlation, these are the related + * @param lambdax,lambday,lambdat for zero correlation, these are the related * RMS sizes (in meters) - * @param sigpx,sigpy,sigpt RMS momentum + * @param lambdapx,lambdapy,lambdapt RMS momentum * @param muxpx,muypy,mutpt correlation length-momentum */ KVdist ( - amrex::ParticleReal sigx, - amrex::ParticleReal sigy, - amrex::ParticleReal sigt, - amrex::ParticleReal sigpx, - amrex::ParticleReal sigpy, - amrex::ParticleReal sigpt, + amrex::ParticleReal lambdax, + amrex::ParticleReal lambday, + amrex::ParticleReal lambdat, + amrex::ParticleReal lambdapx, + amrex::ParticleReal lambdapy, + amrex::ParticleReal lambdapt, amrex::ParticleReal muxpx=0.0, amrex::ParticleReal muypy=0.0, amrex::ParticleReal mutpt=0.0 ) - : m_sigmaX(sigx), m_sigmaY(sigy), m_sigmaT(sigt), m_sigmaPx(sigpx), m_sigmaPy(sigpy), - m_sigmaPt(sigpt), m_muxpx(muxpx), m_muypy(muypy), m_mutpt(mutpt) + : m_lambdaX(lambdax), m_lambdaY(lambday), m_lambdaT(lambdat), m_lambdaPx(lambdapx), m_lambdaPy(lambdapy), + m_lambdaPt(lambdapt), m_muxpx(muxpx), m_muypy(muypy), m_mutpt(mutpt) { } @@ -131,25 +131,25 @@ namespace impactx::distribution // Transform to produce the desired second moments/correlations: root = sqrt(1.0_prt-m_muxpx*m_muxpx); - a1 = m_sigmaX*x/root; - a2 = m_sigmaPx*(-m_muxpx*x/root+px); + a1 = m_lambdaX * x / root; + a2 = m_lambdaPx * (-m_muxpx * x / root + px); x = a1; px = a2; root = sqrt(1.0_prt-m_muypy*m_muypy); - a1 = m_sigmaY*y/root; - a2 = m_sigmaPy*(-m_muypy*y/root+py); + a1 = m_lambdaY * y / root; + a2 = m_lambdaPy * (-m_muypy * y / root + py); y = a1; py = a2; root = sqrt(1.0_prt-m_mutpt*m_mutpt); - a1 = m_sigmaT*t/root; - a2 = m_sigmaPt*(-m_mutpt*t/root+pt); + a1 = m_lambdaT * t / root; + a2 = m_lambdaPt * (-m_mutpt * t / root + pt); t = a1; pt = a2; } private: - amrex::ParticleReal m_sigmaX, m_sigmaY, m_sigmaT; //! related RMS sizes (length) - amrex::ParticleReal m_sigmaPx, m_sigmaPy, m_sigmaPt; //! RMS momentum + amrex::ParticleReal m_lambdaX, m_lambdaY, m_lambdaT; //! related position axis intercepts (length) of the phase space ellipse + amrex::ParticleReal m_lambdaPx, m_lambdaPy, m_lambdaPt; //! related momentum axis intercepts of the phase space ellipse amrex::ParticleReal m_muxpx, m_muypy, m_mutpt; //! correlation length-momentum }; diff --git a/src/particles/distribution/Kurth4D.H b/src/particles/distribution/Kurth4D.H index 9da7de249..cd254d2f9 100644 --- a/src/particles/distribution/Kurth4D.H +++ b/src/particles/distribution/Kurth4D.H @@ -29,24 +29,24 @@ namespace impactx::distribution * * Return sampling from a 4D Kurth + uniform distribution. * - * @param sigx,sigy,sigt for zero correlation, these are the related + * @param lambdax,lambday,lambdat for zero correlation, these are the related * RMS sizes (in meters) - * @param sigpx,sigpy,sigpt RMS momentum + * @param lambdapx,lambdapy,lambdapt RMS momentum * @param muxpx,muypy,mutpt correlation length-momentum */ Kurth4D ( - amrex::ParticleReal sigx, - amrex::ParticleReal sigy, - amrex::ParticleReal sigt, - amrex::ParticleReal sigpx, - amrex::ParticleReal sigpy, - amrex::ParticleReal sigpt, + amrex::ParticleReal lambdax, + amrex::ParticleReal lambday, + amrex::ParticleReal lambdat, + amrex::ParticleReal lambdapx, + amrex::ParticleReal lambdapy, + amrex::ParticleReal lambdapt, amrex::ParticleReal muxpx=0.0, amrex::ParticleReal muypy=0.0, amrex::ParticleReal mutpt=0.0 ) - : m_sigmaX(sigx), m_sigmaY(sigy), m_sigmaT(sigt), m_sigmaPx(sigpx), m_sigmaPy(sigpy), - m_sigmaPt(sigpt), m_muxpx(muxpx), m_muypy(muypy), m_mutpt(mutpt) + : m_lambdaX(lambdax), m_lambdaY(lambday), m_lambdaT(lambdat), m_lambdaPx(lambdapx), m_lambdaPy(lambdapy), + m_lambdaPt(lambdapt), m_muxpx(muxpx), m_muypy(muypy), m_mutpt(mutpt) { } @@ -141,25 +141,25 @@ namespace impactx::distribution // Transform to produce the desired second moments/correlations: root = sqrt(1.0_prt-m_muxpx*m_muxpx); - a1 = m_sigmaX*x/root; - a2 = m_sigmaPx*(-m_muxpx*x/root+px); + a1 = m_lambdaX * x / root; + a2 = m_lambdaPx * (-m_muxpx * x / root + px); x = a1; px = a2; root = sqrt(1.0_prt-m_muypy*m_muypy); - a1 = m_sigmaY*y/root; - a2 = m_sigmaPy*(-m_muypy*y/root+py); + a1 = m_lambdaY * y / root; + a2 = m_lambdaPy * (-m_muypy * y / root + py); y = a1; py = a2; root = sqrt(1.0_prt-m_mutpt*m_mutpt); - a1 = m_sigmaT*t/root; - a2 = m_sigmaPt*(-m_mutpt*t/root+pt); + a1 = m_lambdaT * t / root; + a2 = m_lambdaPt * (-m_mutpt * t / root + pt); t = a1; pt = a2; } private: - amrex::ParticleReal m_sigmaX, m_sigmaY, m_sigmaT; //! related RMS sizes (length) - amrex::ParticleReal m_sigmaPx, m_sigmaPy, m_sigmaPt; //! RMS momentum + amrex::ParticleReal m_lambdaX, m_lambdaY, m_lambdaT; //! related position axis intercepts (length) of the phase space ellipse + amrex::ParticleReal m_lambdaPx, m_lambdaPy, m_lambdaPt; //! related momentum axis intercepts of the phase space ellipse amrex::ParticleReal m_muxpx, m_muypy, m_mutpt; //! correlation length-momentum }; diff --git a/src/particles/distribution/Kurth6D.H b/src/particles/distribution/Kurth6D.H index 86574ce04..e3d1b8c42 100644 --- a/src/particles/distribution/Kurth6D.H +++ b/src/particles/distribution/Kurth6D.H @@ -31,24 +31,24 @@ namespace impactx::distribution * R. Kurth, Quarterly of Applied Mathematics vol. 32, pp. 325-329 (1978) * C. Mitchell, K. Hwang and R. D. Ryne, IPAC2021, WEPAB248 (2021) * - * @param sigx,sigy,sigt for zero correlation, these are the related + * @param lambdax,lambday,lambdat for zero correlation, these are the related * RMS sizes (in meters) - * @param sigpx,sigpy,sigpt RMS momentum + * @param lambdapx,lambdapy,lambdapt RMS momentum * @param muxpx,muypy,mutpt correlation length-momentum */ Kurth6D ( - amrex::ParticleReal sigx, - amrex::ParticleReal sigy, - amrex::ParticleReal sigt, - amrex::ParticleReal sigpx, - amrex::ParticleReal sigpy, - amrex::ParticleReal sigpt, + amrex::ParticleReal lambdax, + amrex::ParticleReal lambday, + amrex::ParticleReal lambdat, + amrex::ParticleReal lambdapx, + amrex::ParticleReal lambdapy, + amrex::ParticleReal lambdapt, amrex::ParticleReal muxpx=0.0, amrex::ParticleReal muypy=0.0, amrex::ParticleReal mutpt=0.0 ) - : m_sigmaX(sigx), m_sigmaY(sigy), m_sigmaT(sigt), m_sigmaPx(sigpx), m_sigmaPy(sigpy), - m_sigmaPt(sigpt), m_muxpx(muxpx), m_muypy(muypy), m_mutpt(mutpt) + : m_lambdaX(lambdax), m_lambdaY(lambday), m_lambdaT(lambdat), m_lambdaPx(lambdapx), m_lambdaPy(lambdapy), + m_lambdaPt(lambdapt), m_muxpx(muxpx), m_muypy(muypy), m_mutpt(mutpt) { } @@ -147,25 +147,25 @@ namespace impactx::distribution // Transform to produce the desired second moments/correlations: root = sqrt(1.0_prt-m_muxpx*m_muxpx); - a1 = m_sigmaX*x/root; - a2 = m_sigmaPx*(-m_muxpx*x/root+px); + a1 = m_lambdaX * x / root; + a2 = m_lambdaPx * (-m_muxpx * x / root + px); x = a1; px = a2; root = sqrt(1.0_prt-m_muypy*m_muypy); - a1 = m_sigmaY*y/root; - a2 = m_sigmaPy*(-m_muypy*y/root+py); + a1 = m_lambdaY * y / root; + a2 = m_lambdaPy * (-m_muypy * y / root + py); y = a1; py = a2; root = sqrt(1.0_prt-m_mutpt*m_mutpt); - a1 = m_sigmaT*t/root; - a2 = m_sigmaPt*(-m_mutpt*t/root+pt); + a1 = m_lambdaT * t / root; + a2 = m_lambdaPt * (-m_mutpt * t / root + pt); t = a1; pt = a2; } private: - amrex::ParticleReal m_sigmaX, m_sigmaY, m_sigmaT; //! related RMS sizes (length) - amrex::ParticleReal m_sigmaPx, m_sigmaPy, m_sigmaPt; //! RMS momentum + amrex::ParticleReal m_lambdaX, m_lambdaY, m_lambdaT; //! related position axis intercepts (length) of the phase space ellipse + amrex::ParticleReal m_lambdaPx, m_lambdaPy, m_lambdaPt; //! related momentum axis intercepts of the phase space ellipse amrex::ParticleReal m_muxpx, m_muypy, m_mutpt; //! correlation length-momentum }; diff --git a/src/particles/distribution/Semigaussian.H b/src/particles/distribution/Semigaussian.H index 2f1a942cc..63d985657 100644 --- a/src/particles/distribution/Semigaussian.H +++ b/src/particles/distribution/Semigaussian.H @@ -29,24 +29,24 @@ namespace impactx::distribution * Return sampling from a 6D Semi-Gaussian distribution (uniform in * position, Gaussian in momentum). * - * @param sigx,sigy,sigt for zero correlation, these are the related + * @param lambdax,lambday,lambdat for zero correlation, these are the related * RMS sizes (in meters) - * @param sigpx,sigpy,sigpt RMS momentum + * @param lambdapx,lambdapy,lambdapt RMS momentum * @param muxpx,muypy,mutpt correlation length-momentum */ Semigaussian ( - amrex::ParticleReal sigx, - amrex::ParticleReal sigy, - amrex::ParticleReal sigt, - amrex::ParticleReal sigpx, - amrex::ParticleReal sigpy, - amrex::ParticleReal sigpt, + amrex::ParticleReal lambdax, + amrex::ParticleReal lambday, + amrex::ParticleReal lambdat, + amrex::ParticleReal lambdapx, + amrex::ParticleReal lambdapy, + amrex::ParticleReal lambdapt, amrex::ParticleReal muxpx=0.0, amrex::ParticleReal muypy=0.0, amrex::ParticleReal mutpt=0.0 ) - : m_sigmaX(sigx), m_sigmaY(sigy), m_sigmaT(sigt), m_sigmaPx(sigpx), m_sigmaPy(sigpy), - m_sigmaPt(sigpt), m_muxpx(muxpx), m_muypy(muypy), m_mutpt(mutpt) + : m_lambdaX(lambdax), m_lambdaY(lambday), m_lambdaT(lambdat), m_lambdaPx(lambdapx), m_lambdaPy(lambdapy), + m_lambdaPt(lambdapt), m_muxpx(muxpx), m_muypy(muypy), m_mutpt(mutpt) { } @@ -130,25 +130,25 @@ namespace impactx::distribution // Transform to produce the desired second moments/correlations: root = sqrt(1.0_prt-m_muxpx*m_muxpx); - a1 = m_sigmaX*x/root; - a2 = m_sigmaPx*(-m_muxpx*x/root+px); + a1 = m_lambdaX * x / root; + a2 = m_lambdaPx * (-m_muxpx * x / root + px); x = a1; px = a2; root = sqrt(1.0_prt-m_muypy*m_muypy); - a1 = m_sigmaY*y/root; - a2 = m_sigmaPy*(-m_muypy*y/root+py); + a1 = m_lambdaY * y / root; + a2 = m_lambdaPy * (-m_muypy * y / root + py); y = a1; py = a2; root = sqrt(1.0_prt-m_mutpt*m_mutpt); - a1 = m_sigmaT*t/root; - a2 = m_sigmaPt*(-m_mutpt*t/root+pt); + a1 = m_lambdaT * t / root; + a2 = m_lambdaPt * (-m_mutpt * t / root + pt); t = a1; pt = a2; } private: - amrex::ParticleReal m_sigmaX, m_sigmaY, m_sigmaT; //! related RMS sizes (length) - amrex::ParticleReal m_sigmaPx, m_sigmaPy, m_sigmaPt; //! RMS momentum + amrex::ParticleReal m_lambdaX, m_lambdaY, m_lambdaT; //! related position axis intercepts (length) of the phase space ellipse + amrex::ParticleReal m_lambdaPx, m_lambdaPy, m_lambdaPt; //! related momentum axis intercepts of the phase space ellipse amrex::ParticleReal m_muxpx, m_muypy, m_mutpt; //! correlation length-momentum }; diff --git a/src/particles/distribution/Triangle.H b/src/particles/distribution/Triangle.H index 61e916d51..a1f40dc14 100644 --- a/src/particles/distribution/Triangle.H +++ b/src/particles/distribution/Triangle.H @@ -30,20 +30,20 @@ namespace impactx::distribution * with a Gaussian energy spread (possibly correlated). The * transverse distribution is a 4D waterbag. * - * @param sigx,sigy,sigt for zero correlation, these are the related + * @param lambdax,lambday,lambdat for zero correlation, these are the related * RMS sizes (in meters) - * @param sigpx,sigpy,sigpt RMS momentum + * @param lambdapx,lambdapy,lambdapt RMS momentum * @param muxpx,muypy,mutpt correlation length-momentum */ Triangle ( - amrex::ParticleReal const sigx, amrex::ParticleReal const sigy, - amrex::ParticleReal const sigt, amrex::ParticleReal const sigpx, - amrex::ParticleReal const sigpy, amrex::ParticleReal const sigpt, - amrex::ParticleReal const muxpx=0.0, amrex::ParticleReal const muypy=0.0, - amrex::ParticleReal const mutpt=0.0 + amrex::ParticleReal const lambdax, amrex::ParticleReal const lambday, + amrex::ParticleReal const lambdat, amrex::ParticleReal const lambdapx, + amrex::ParticleReal const lambdapy, amrex::ParticleReal const lambdapt, + amrex::ParticleReal const muxpx=0.0, amrex::ParticleReal const muypy=0.0, + amrex::ParticleReal const mutpt=0.0 ) - : m_sigmaX(sigx), m_sigmaY(sigy), m_sigmaT(sigt), m_sigmaPx(sigpx), m_sigmaPy(sigpy), - m_sigmaPt(sigpt), m_muxpx(muxpx), m_muypy(muypy), m_mutpt(mutpt) + : m_lambdaX(lambdax), m_lambdaY(lambday), m_lambdaT(lambdat), m_lambdaPx(lambdapx), m_lambdaPy(lambdapy), + m_lambdaPt(lambdapt), m_muxpx(muxpx), m_muypy(muypy), m_mutpt(mutpt) { } @@ -138,24 +138,24 @@ namespace impactx::distribution // Transform to produce the desired second moments/correlations: root = sqrt(1.0_prt-m_muxpx*m_muxpx); - a1 = m_sigmaX*x/root; - a2 = m_sigmaPx*(-m_muxpx*x/root+px); + a1 = m_lambdaX * x / root; + a2 = m_lambdaPx * (-m_muxpx * x / root + px); x = a1; px = a2; root = sqrt(1.0_prt-m_muypy*m_muypy); - a1 = m_sigmaY*y/root; - a2 = m_sigmaPy*(-m_muypy*y/root+py); + a1 = m_lambdaY * y / root; + a2 = m_lambdaPy * (-m_muypy * y / root + py); y = a1; py = a2; root = sqrt(1.0_prt-m_mutpt*m_mutpt); - a1 = m_sigmaT*t/root; - a2 = m_sigmaPt*(-m_mutpt*t/root+pt); + a1 = m_lambdaT * t / root; + a2 = m_lambdaPt * (-m_mutpt * t / root + pt); t = a1; pt = a2; } private: - amrex::ParticleReal m_sigmaX, m_sigmaY, m_sigmaT; //! related RMS sizes (length) - amrex::ParticleReal m_sigmaPx, m_sigmaPy, m_sigmaPt; //! RMS momentum + amrex::ParticleReal m_lambdaX, m_lambdaY, m_lambdaT; //! related position axis intercepts (length) of the phase space ellipse + amrex::ParticleReal m_lambdaPx, m_lambdaPy, m_lambdaPt; //! related momentum axis intercepts of the phase space ellipse amrex::ParticleReal m_muxpx, m_muypy, m_mutpt; //! correlation length-momentum }; diff --git a/src/particles/distribution/Waterbag.H b/src/particles/distribution/Waterbag.H index b86837e78..4f32fdd57 100644 --- a/src/particles/distribution/Waterbag.H +++ b/src/particles/distribution/Waterbag.H @@ -28,24 +28,24 @@ namespace impactx::distribution * * Return sampling from a 6D Waterbag distribution. * - * @param sigx,sigy,sigt for zero correlation, these are the related + * @param lambdax,lambday,lambdat for zero correlation, these are the related * RMS sizes (in meters) - * @param sigpx,sigpy,sigpt RMS momentum + * @param lambdapx,lambdapy,lambdapt RMS momentum * @param muxpx,muypy,mutpt correlation length-momentum */ Waterbag ( - amrex::ParticleReal sigx, - amrex::ParticleReal sigy, - amrex::ParticleReal sigt, - amrex::ParticleReal sigpx, - amrex::ParticleReal sigpy, - amrex::ParticleReal sigpt, + amrex::ParticleReal lambdax, + amrex::ParticleReal lambday, + amrex::ParticleReal lambdat, + amrex::ParticleReal lambdapx, + amrex::ParticleReal lambdapy, + amrex::ParticleReal lambdapt, amrex::ParticleReal muxpx=0.0, amrex::ParticleReal muypy=0.0, amrex::ParticleReal mutpt=0.0 ) - : m_sigmaX(sigx), m_sigmaY(sigy), m_sigmaT(sigt), m_sigmaPx(sigpx), m_sigmaPy(sigpy), - m_sigmaPt(sigpt), m_muxpx(muxpx), m_muypy(muypy), m_mutpt(mutpt) + : m_lambdaX(lambdax), m_lambdaY(lambday), m_lambdaT(lambdat), m_lambdaPx(lambdapx), m_lambdaPy(lambdapy), + m_lambdaPt(lambdapt), m_muxpx(muxpx), m_muypy(muypy), m_mutpt(mutpt) { } @@ -135,25 +135,25 @@ namespace impactx::distribution // Transform to produce the desired second moments/correlations: root = std::sqrt(1.0_prt-m_muxpx*m_muxpx); - a1 = m_sigmaX*x/root; - a2 = m_sigmaPx*(-m_muxpx*x/root+px); + a1 = m_lambdaX * x / root; + a2 = m_lambdaPx * (-m_muxpx * x / root + px); x = a1; px = a2; root = std::sqrt(1.0_prt-m_muypy*m_muypy); - a1 = m_sigmaY*y/root; - a2 = m_sigmaPy*(-m_muypy*y/root+py); + a1 = m_lambdaY * y / root; + a2 = m_lambdaPy * (-m_muypy * y / root + py); y = a1; py = a2; root = std::sqrt(1.0_prt-m_mutpt*m_mutpt); - a1 = m_sigmaT*t/root; - a2 = m_sigmaPt*(-m_mutpt*t/root+pt); + a1 = m_lambdaT * t / root; + a2 = m_lambdaPt * (-m_mutpt * t / root + pt); t = a1; pt = a2; } private: - amrex::ParticleReal m_sigmaX,m_sigmaY,m_sigmaT; //! related RMS sizes (length) - amrex::ParticleReal m_sigmaPx,m_sigmaPy,m_sigmaPt; //! RMS momentum + amrex::ParticleReal m_lambdaX,m_lambdaY,m_lambdaT; //! related position axis intercepts (length) of the phase space ellipse + amrex::ParticleReal m_lambdaPx,m_lambdaPy,m_lambdaPt; //! related momentum axis intercepts of the phase space ellipse amrex::ParticleReal m_muxpx,m_muypy,m_mutpt; //! correlation length-momentum }; diff --git a/src/python/distribution.cpp b/src/python/distribution.cpp index c7bc359cd..c1c1c3a0d 100644 --- a/src/python/distribution.cpp +++ b/src/python/distribution.cpp @@ -29,8 +29,8 @@ void init_distribution(py::module& m) amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal >(), - py::arg("sigmaX"), py::arg("sigmaY"), py::arg("sigmaT"), - py::arg("sigmaPx"), py::arg("sigmaPy"), py::arg("sigmaPt"), + py::arg("lambdaX"), py::arg("lambdaY"), py::arg("lambdaT"), + py::arg("lambdaPx"), py::arg("lambdaPy"), py::arg("lambdaPt"), py::arg("muxpx")=0.0, py::arg("muypy")=0.0, py::arg("mutpt")=0.0, "A 6D Gaussian distribution" ); @@ -41,8 +41,8 @@ void init_distribution(py::module& m) amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal >(), - py::arg("sigmaX"), py::arg("sigmaY"), py::arg("sigmaT"), - py::arg("sigmaPx"), py::arg("sigmaPy"), py::arg("sigmaPt"), + py::arg("lambdaX"), py::arg("lambdaY"), py::arg("lambdaT"), + py::arg("lambdaPx"), py::arg("lambdaPy"), py::arg("lambdaPt"), py::arg("muxpx")=0.0, py::arg("muypy")=0.0, py::arg("mutpt")=0.0, "A 4D Kurth distribution transversely + a uniform distribution\n" "in t + a Gaussian distribution in pt" @@ -54,8 +54,8 @@ void init_distribution(py::module& m) amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal >(), - py::arg("sigmaX"), py::arg("sigmaY"), py::arg("sigmaT"), - py::arg("sigmaPx"), py::arg("sigmaPy"), py::arg("sigmaPt"), + py::arg("lambdaX"), py::arg("lambdaY"), py::arg("lambdaT"), + py::arg("lambdaPx"), py::arg("lambdaPy"), py::arg("lambdaPt"), py::arg("muxpx")=0.0, py::arg("muypy")=0.0, py::arg("mutpt")=0.0, "A 6D Kurth distribution\n\n" "R. Kurth, Quarterly of Applied Mathematics vol. 32, pp. 325-329 (1978)\n" @@ -68,8 +68,8 @@ void init_distribution(py::module& m) amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal >(), - py::arg("sigmaX"), py::arg("sigmaY"), py::arg("sigmaT"), - py::arg("sigmaPx"), py::arg("sigmaPy"), py::arg("sigmaPt"), + py::arg("lambdaX"), py::arg("lambdaY"), py::arg("lambdaT"), + py::arg("lambdaPx"), py::arg("lambdaPy"), py::arg("lambdaPt"), py::arg("muxpx")=0.0, py::arg("muypy")=0.0, py::arg("mutpt")=0.0, "A K-V distribution transversely + a uniform distribution\n" "in t + a Gaussian distribution in pt" @@ -86,8 +86,8 @@ void init_distribution(py::module& m) amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal >(), - py::arg("sigmaX"), py::arg("sigmaY"), py::arg("sigmaT"), - py::arg("sigmaPx"), py::arg("sigmaPy"), py::arg("sigmaPt"), + py::arg("lambdaX"), py::arg("lambdaY"), py::arg("lambdaT"), + py::arg("lambdaPx"), py::arg("lambdaPy"), py::arg("lambdaPt"), py::arg("muxpx")=0.0, py::arg("muypy")=0.0, py::arg("mutpt")=0.0, "A 6D Semi-Gaussian distribution (uniform in position, Gaussian in momentum)." ); @@ -110,8 +110,8 @@ void init_distribution(py::module& m) amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal >(), - py::arg("sigmaX"), py::arg("sigmaY"), py::arg("sigmaT"), - py::arg("sigmaPx"), py::arg("sigmaPy"), py::arg("sigmaPt"), + py::arg("lambdaX"), py::arg("lambdaY"), py::arg("lambdaT"), + py::arg("lambdaPx"), py::arg("lambdaPy"), py::arg("lambdaPt"), py::arg("muxpx")=0.0, py::arg("muypy")=0.0, py::arg("mutpt")=0.0, "A triangle distribution for laser-plasma acceleration related applications.\n\n" "A ramped, triangular current profile with a Gaussian energy spread (possibly correlated).\n" @@ -124,8 +124,8 @@ void init_distribution(py::module& m) amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal >(), - py::arg("sigmaX"), py::arg("sigmaY"), py::arg("sigmaT"), - py::arg("sigmaPx"), py::arg("sigmaPy"), py::arg("sigmaPt"), + py::arg("lambdaX"), py::arg("lambdaY"), py::arg("lambdaT"), + py::arg("lambdaPx"), py::arg("lambdaPy"), py::arg("lambdaPt"), py::arg("muxpx")=0.0, py::arg("muypy")=0.0, py::arg("mutpt")=0.0, "A 6D Waterbag distribution" ); diff --git a/tests/python/test_dataframe.py b/tests/python/test_dataframe.py index 6a84c0e38..7a7ec5e25 100644 --- a/tests/python/test_dataframe.py +++ b/tests/python/test_dataframe.py @@ -33,12 +33,12 @@ def test_df_pandas(): # particle bunch distr = distribution.Waterbag( - sigmaX=3.9984884770e-5, - sigmaY=3.9984884770e-5, - sigmaT=1.0e-3, - sigmaPx=2.6623538760e-5, - sigmaPy=2.6623538760e-5, - sigmaPt=2.0e-3, + lambdaX=3.9984884770e-5, + lambdaY=3.9984884770e-5, + lambdaT=1.0e-3, + lambdaPx=2.6623538760e-5, + lambdaPy=2.6623538760e-5, + lambdaPt=2.0e-3, muxpx=-0.846574929020762, muypy=0.846574929020762, mutpt=0.0, diff --git a/tests/python/test_impactx.py b/tests/python/test_impactx.py index 770ae27ea..b8cd6e4d7 100755 --- a/tests/python/test_impactx.py +++ b/tests/python/test_impactx.py @@ -95,12 +95,12 @@ def test_impactx_nofile(): # particle bunch distr = distribution.Waterbag( - sigmaX=3.9984884770e-5, - sigmaY=3.9984884770e-5, - sigmaT=1.0e-3, - sigmaPx=2.6623538760e-5, - sigmaPy=2.6623538760e-5, - sigmaPt=2.0e-3, + lambdaX=3.9984884770e-5, + lambdaY=3.9984884770e-5, + lambdaT=1.0e-3, + lambdaPx=2.6623538760e-5, + lambdaPy=2.6623538760e-5, + lambdaPt=2.0e-3, muxpx=-0.846574929020762, muypy=0.846574929020762, mutpt=0.0, @@ -211,12 +211,12 @@ def test_impactx_resting_refparticle(): # reference particle: init intentionally missing # particle bunch gaussian = distribution.Gaussian( - sigmaX=4.0e-5, - sigmaY=5.0e-5, - sigmaT=1.0e-3, - sigmaPx=1.0e-5, - sigmaPy=3.0e-5, - sigmaPt=2.0e-3, + lambdaX=4.0e-5, + lambdaY=5.0e-5, + lambdaT=1.0e-3, + lambdaPx=1.0e-5, + lambdaPy=3.0e-5, + lambdaPt=2.0e-3, ) with pytest.raises( RuntimeError, diff --git a/tests/python/test_push.py b/tests/python/test_push.py index 81868e8cb..3c4cc962a 100644 --- a/tests/python/test_push.py +++ b/tests/python/test_push.py @@ -31,12 +31,12 @@ def test_element_push(): # particle bunch distr = distribution.Waterbag( - sigmaX=3.9984884770e-5, - sigmaY=3.9984884770e-5, - sigmaT=1.0e-3, - sigmaPx=2.6623538760e-5, - sigmaPy=2.6623538760e-5, - sigmaPt=2.0e-3, + lambdaX=3.9984884770e-5, + lambdaY=3.9984884770e-5, + lambdaT=1.0e-3, + lambdaPx=2.6623538760e-5, + lambdaPy=2.6623538760e-5, + lambdaPt=2.0e-3, muxpx=-0.846574929020762, muypy=0.846574929020762, mutpt=0.0, diff --git a/tests/python/test_transformation.py b/tests/python/test_transformation.py index 54df1bbd5..030f5ea72 100644 --- a/tests/python/test_transformation.py +++ b/tests/python/test_transformation.py @@ -41,12 +41,12 @@ def test_transformation(): # particle bunch distr = distribution.Gaussian( - sigmaX=3e-6, - sigmaY=3e-6, - sigmaT=1e-2, - sigmaPx=1.33 / energy_gamma, - sigmaPy=1.33 / energy_gamma, - sigmaPt=100 / energy_gamma, + lambdaX=3e-6, + lambdaY=3e-6, + lambdaT=1e-2, + lambdaPx=1.33 / energy_gamma, + lambdaPy=1.33 / energy_gamma, + lambdaPt=100 / energy_gamma, muxpx=-0.5, muypy=0.4, mutpt=0.8,