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
957c8b55
Commit
957c8b55
authored
3 years ago
by
Watanyu Foosang
Browse files
Options
Downloads
Patches
Plain Diff
Include ADTS in phase advance calculation
parent
73ca5144
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
+16
-3
16 additions, 3 deletions
tracking/element.py
tracking/synchrotron.py
+1
-0
1 addition, 0 deletions
tracking/synchrotron.py
with
17 additions
and
3 deletions
tracking/element.py
+
16
−
3
View file @
957c8b55
...
...
@@ -153,6 +153,11 @@ class TransverseMap(Element):
self
.
gamma
=
self
.
ring
.
optics
.
local_gamma
self
.
dispersion
=
self
.
ring
.
optics
.
local_dispersion
self
.
phase_advance
=
self
.
ring
.
tune
[
0
:
2
]
*
2
*
np
.
pi
if
self
.
ring
.
adts
.
all
()
==
0
:
self
.
adts_option
=
False
else
:
self
.
adts_option
=
True
@Element.parallel
def
track
(
self
,
bunch
):
...
...
@@ -166,9 +171,17 @@ class TransverseMap(Element):
bunch : Bunch or Beam object
"""
# Compute phase adcence which depends on energy via chromaticity
phase_advance_x
=
self
.
phase_advance
[
0
]
*
(
1
+
self
.
ring
.
chro
[
0
]
*
bunch
[
"
delta
"
])
phase_advance_y
=
self
.
phase_advance
[
1
]
*
(
1
+
self
.
ring
.
chro
[
1
]
*
bunch
[
"
delta
"
])
# Compute phase advance which depends on energy via chromaticity and ADTS
if
self
.
adts_option
is
True
:
phase_advance_x
=
self
.
phase_advance
[
0
]
*
(
1
+
self
.
ring
.
chro
[
0
]
*
bunch
[
"
delta
"
]
+
self
.
ring
.
adts
[
0
](
bunch
[
'
x
'
])
+
self
.
ring
.
adts
[
2
](
bunch
[
'
y
'
]))
phase_advance_y
=
self
.
phase_advance
[
1
]
*
(
1
+
self
.
ring
.
chro
[
1
]
*
bunch
[
"
delta
"
]
+
self
.
ring
.
adts
[
1
](
bunch
[
'
x
'
])
+
self
.
ring
.
adts
[
3
](
bunch
[
'
y
'
]))
else
:
phase_advance_x
=
self
.
phase_advance
[
0
]
*
(
1
+
self
.
ring
.
chro
[
0
]
*
bunch
[
"
delta
"
])
phase_advance_y
=
self
.
phase_advance
[
1
]
*
(
1
+
self
.
ring
.
chro
[
1
]
*
bunch
[
"
delta
"
])
# 6x6 matrix corresponding to (x, xp, delta, y, yp, delta)
matrix
=
np
.
zeros
((
6
,
6
,
len
(
bunch
)))
...
...
This diff is collapsed.
Click to expand it.
tracking/synchrotron.py
+
1
−
0
View file @
957c8b55
...
...
@@ -99,6 +99,7 @@ class Synchrotron:
self
.
sigma_delta
=
kwargs
.
get
(
'
sigma_delta
'
)
# Equilibrium energy spread
self
.
sigma_0
=
kwargs
.
get
(
'
sigma_0
'
)
# Natural bunch length [s]
self
.
emit
=
kwargs
.
get
(
'
emit
'
)
# X/Y emittances in [m.rad]
self
.
adts
=
kwargs
.
get
(
'
adts
'
)
# Amplitude-Dependent Tune Shift (ADTS)
@property
def
h
(
self
):
...
...
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