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
1a92be9d
Commit
1a92be9d
authored
3 years ago
by
Watanyu Foosang
Browse files
Options
Downloads
Patches
Plain Diff
Modify ADTS encapsulation from array to list
parent
6cb37ed6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tracking/element.py
+5
-9
5 additions, 9 deletions
tracking/element.py
tracking/synchrotron.py
+2
-2
2 additions, 2 deletions
tracking/synchrotron.py
with
7 additions
and
11 deletions
tracking/element.py
+
5
−
9
View file @
1a92be9d
...
...
@@ -155,14 +155,10 @@ class TransverseMap(Element):
self
.
phase_advance
=
self
.
ring
.
tune
[
0
:
2
]
*
2
*
np
.
pi
if
self
.
ring
.
adts
is
not
None
:
self
.
adts_option
=
True
self
.
adts_poly
=
np
.
array
([
np
.
poly1d
(
self
.
ring
.
adts
[
0
]),
np
.
poly1d
(
self
.
ring
.
adts
[
1
]),
np
.
poly1d
(
self
.
ring
.
adts
[
2
]),
np
.
poly1d
(
self
.
ring
.
adts
[
3
])])
else
:
self
.
adts_option
=
False
self
.
adts_poly
=
[
np
.
poly1d
(
self
.
ring
.
adts
[
0
]),
np
.
poly1d
(
self
.
ring
.
adts
[
1
]),
np
.
poly1d
(
self
.
ring
.
adts
[
2
]),
np
.
poly1d
(
self
.
ring
.
adts
[
3
])]
@Element.parallel
def
track
(
self
,
bunch
):
...
...
@@ -177,7 +173,7 @@ class TransverseMap(Element):
"""
# Compute phase advance which depends on energy via chromaticity and ADTS
if
self
.
adts_option
is
Tru
e
:
if
self
.
ring
.
adts
is
not
Non
e
:
phase_advance_x
=
self
.
phase_advance
[
0
]
*
(
1
+
self
.
ring
.
chro
[
0
]
*
bunch
[
"
delta
"
]
+
self
.
adts_poly
[
0
](
bunch
[
'
x
'
])
+
self
.
adts_poly
[
2
](
bunch
[
'
y
'
]))
...
...
This diff is collapsed.
Click to expand it.
tracking/synchrotron.py
+
2
−
2
View file @
1a92be9d
...
...
@@ -44,8 +44,8 @@ class Synchrotron:
Horizontal and vertical (non-normalized) chromaticities.
U0 : float, optional
Energy loss per turn in [eV].
adts :
array of shape (4,)
or None, optional
Array
that contains arrays of polynomial
'
s coefficients, in decreasing
adts :
list of arrays
or None, optional
List
that contains arrays of polynomial
'
s coefficients, in decreasing
powers, used to determine Amplitude-Dependent Tune Shifts (ADTS).
The order of the elements strictly needs to be
[coef_xx, coef_yx, coef_xy, coef_yy], where x and y denote the horizontal
...
...
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