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
11ec12f3
Commit
11ec12f3
authored
1 week ago
by
Alexis GAMELIN
Browse files
Options
Downloads
Patches
Plain Diff
Add test flags
parent
1fd72e16
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mbtrack2/tracking/beam_ion_effects.py
+10
-3
10 additions, 3 deletions
mbtrack2/tracking/beam_ion_effects.py
with
10 additions
and
3 deletions
mbtrack2/tracking/beam_ion_effects.py
+
10
−
3
View file @
11ec12f3
...
...
@@ -547,6 +547,9 @@ class BeamIonElement(Element):
self
.
generate_ions
=
generate_ions
self
.
beam_ion_interaction
=
beam_ion_interaction
self
.
ion_drift
=
ion_drift
self
.
init_asbefore
=
True
self
.
switch_new
=
True
# interfaces for apertures and montiors
self
.
apertures
=
[]
...
...
@@ -641,7 +644,7 @@ class BeamIonElement(Element):
raise
ValueError
(
f
"
The implementation for required beam-ion interaction model
\
{
field_model
}
is not implemented
"
)
if
isinstance
(
second_beam
,
IonParticles
):
if
isinstance
(
second_beam
,
IonParticles
)
and
self
.
switch_new
:
sb_mx
,
sb_my
,
sb_stdx
,
sb_stdy
=
second_beam
.
mean_std_xy
else
:
sb_mx
,
sb_stdx
=
(
...
...
@@ -664,7 +667,7 @@ class BeamIonElement(Element):
)
elif
field_model
==
"
strong
"
:
if
isinstance
(
first_beam
,
IonParticles
):
if
isinstance
(
first_beam
,
IonParticles
)
and
self
.
switch_new
:
fb_mx
,
fb_my
=
first_beam
.
mean_xy
else
:
fb_mx
,
fb_my
=
(
...
...
@@ -788,7 +791,11 @@ class BeamIonElement(Element):
if
not
empty_bucket
and
self
.
generate_ions
:
self
.
generate_new_ions
(
electron_bunch
=
electron_bunch
)
if
self
.
init_asbefore
:
self
.
init_asbefore
=
False
self
.
ion_beam
[
"
charge
"
][
0
]
=
self
.
ion_beam
[
"
charge
"
][
1
]
for
aperture
in
self
.
apertures
:
aperture
.
track
(
self
.
ion_beam
)
...
...
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