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
6b8b1ec0
Commit
6b8b1ec0
authored
4 years ago
by
Gamelin Alexis
Browse files
Options
Downloads
Patches
Plain Diff
Add synchrotron_tune method to Synchrotron class
parent
9ca25437
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tracking/synchrotron.py
+25
-1
25 additions, 1 deletion
tracking/synchrotron.py
with
25 additions
and
1 deletion
tracking/synchrotron.py
+
25
−
1
View file @
6b8b1ec0
...
...
@@ -69,6 +69,11 @@ class Synchrotron:
Momentum compaction.
sigma : array of shape (4,)
RMS beam size at equilibrium in [m].
Methods
-------
synchrotron_tune(Vrf)
Compute synchrotron tune from RF voltage.
"""
def
__init__
(
self
,
h
,
optics
,
particle
,
**
kwargs
):
self
.
_h
=
h
...
...
@@ -230,4 +235,23 @@ class Synchrotron:
self
.
optics
.
local_dispersion
[
2
]
**
2
*
self
.
sigma_delta
)
**
0.5
sigma
[
3
]
=
(
self
.
emit
[
1
]
*
self
.
optics
.
local_alpha
[
1
]
+
self
.
optics
.
local_dispersion
[
3
]
**
2
*
self
.
sigma_delta
)
**
0.5
return
sigma
\ No newline at end of file
return
sigma
def
synchrotron_tune
(
Vrf
):
"""
Compute synchrotron tune from RF voltage
Parameters
----------
Vrf : float
Main RF voltage in [V].
Returns
-------
tuneS : float
Synchrotron tune.
"""
phase
=
np
.
pi
-
np
.
arcsin
(
ring
.
U0
/
Vrf
)
tuneS
=
np
.
sqrt
(
-
(
Vrf
/
ring
.
E0
)
*
(
ring
.
h
*
ring
.
ac
)
/
(
2
*
np
.
pi
)
*
np
.
cos
(
phase
)
)
return
tuneS
\ No newline at end of file
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