Skip to content
Snippets Groups Projects
Commit 6233924f authored by Alexis GAMELIN's avatar Alexis GAMELIN
Browse files

Add lattice check to get_chroma.

Fix docstrings
parent 574eff6d
Branches
Tags
2 merge requests!280.8.0,!16Nonlinear chromaticity
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment