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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PA
Collective Effects
mbtrack2
Commits
6233924f
Commit
6233924f
authored
Jul 31, 2024
by
Alexis GAMELIN
Browse files
Options
Downloads
Patches
Plain Diff
Add lattice check to get_chroma.
Fix docstrings
parent
574eff6d
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!28
0.8.0
,
!16
Nonlinear chromaticity
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
mbtrack2/tracking/synchrotron.py
+8
-2
8 additions, 2 deletions
mbtrack2/tracking/synchrotron.py
with
8 additions
and
2 deletions
mbtrack2/tracking/synchrotron.py
+
8
−
2
View file @
6233924f
...
...
@@ -109,6 +109,9 @@ class Synchrotron:
get_adts()
Compute and add Amplitude-Dependent Tune Shifts (ADTS) sextupolar
componenet from AT lattice.
get_chroma()
Compute chromaticity (linear and nonlinear) from AT lattice and
update the property.
get_mcf_order()
Compute momentum compaction factor up to 3rd order from AT lattice.
get_longitudinal_twiss(V)
...
...
@@ -389,9 +392,12 @@ class Synchrotron:
def
get_chroma
(
self
,
order
=
4
,
dpm
=
0.02
,
n_points
=
100
):
"""
Compute
and add
chromaticity (linear and nonlinear) from AT lattice and update the property.
Compute chromaticity (linear and nonlinear) from AT lattice and update the property.
"""
import
at
if
self
.
optics
.
use_local_values
:
raise
ValueError
(
"
Value needs to be provided manualy as no AT
"
+
"
lattice file is loaded.
"
)
fit
,
dpa
,
tune
=
at
.
physics
.
nonlinear
.
chromaticity
(
self
.
optics
.
lattice
,
method
=
'
linopt
'
,
dpm
=
dpm
,
...
...
@@ -424,7 +430,7 @@ class Synchrotron:
"""
import
at
if
self
.
optics
.
use_local_values
:
raise
ValueError
(
"
ADTS
needs to be provided manualy as no AT
"
+
raise
ValueError
(
"
Value
needs to be provided manualy as no AT
"
+
"
lattice file is loaded.
"
)
deltamin
=
-
1e-4
deltamax
=
1e-4
...
...
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