Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
mbtrack2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PA
Collective Effects
mbtrack2
Commits
13f4fff2
Commit
13f4fff2
authored
6 months ago
by
Vadim Gubaidulin
Browse files
Options
Downloads
Patches
Plain Diff
bugfixes
parent
faf41fb0
No related branches found
No related tags found
2 merge requests
!28
0.8.0
,
!18
Ions
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mbtrack2/tracking/beam_ion_effects.py
+6
-6
6 additions, 6 deletions
mbtrack2/tracking/beam_ion_effects.py
with
6 additions
and
6 deletions
mbtrack2/tracking/beam_ion_effects.py
+
6
−
6
View file @
13f4fff2
...
@@ -464,13 +464,13 @@ class BeamIonElement(Element):
...
@@ -464,13 +464,13 @@ class BeamIonElement(Element):
@wraps
(
track
)
@wraps
(
track
)
def
track_wrapper
(
*
args
,
**
kwargs
):
def
track_wrapper
(
*
args
,
**
kwargs
):
if
isinstance
(
args
[
1
],
Beam
):
if
isinstance
(
args
[
1
],
Beam
):
if
Beam
.
switch_mpi
:
self
=
args
[
0
]
beam
=
args
[
1
]
if
beam
.
mpi_switch
:
warnings
.
warn
(
warnings
.
warn
(
'
Tracking through beam-ion element is performed sequentially. Bunches are not parallelized.
'
,
'
Tracking through beam-ion element is performed sequentially. Bunches are not parallelized.
'
,
UserWarning
,
UserWarning
,
stacklevel
=
2
)
stacklevel
=
2
)
self
=
args
[
0
]
beam
=
args
[
1
]
for
bunch
in
beam
.
bunch_list
:
for
bunch
in
beam
.
bunch_list
:
track
(
self
,
bunch
,
*
args
[
2
:],
**
kwargs
)
track
(
self
,
bunch
,
*
args
[
2
:],
**
kwargs
)
else
:
else
:
...
@@ -608,9 +608,9 @@ class BeamIonElement(Element):
...
@@ -608,9 +608,9 @@ class BeamIonElement(Element):
The new y momentum of the first beam.
The new y momentum of the first beam.
"""
"""
en_x
,
en_y
=
BeamIonElement
.
_get_efields
(
first_beam
,
en_x
,
en_y
=
self
.
_get_efields
(
first_beam
,
second_beam
,
second_beam
,
field_model
=
field_model
)
field_model
=
field_model
)
kicks_x
=
prefactor
*
en_x
kicks_x
=
prefactor
*
en_x
kicks_y
=
prefactor
*
en_y
kicks_y
=
prefactor
*
en_y
new_xp
=
first_beam
[
"
xp
"
]
+
kicks_x
new_xp
=
first_beam
[
"
xp
"
]
+
kicks_x
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment