Skip to content
Snippets Groups Projects
Commit 9529ba34 authored by Vadim Gubaidulin's avatar Vadim Gubaidulin
Browse files

added get_chroma() method to compute chromaticity up to arbitrary order from the lattice file.

parent 4770618a
No related branches found
No related tags found
2 merge requests!280.8.0,!16Nonlinear chromaticity
...@@ -387,6 +387,16 @@ class Synchrotron: ...@@ -387,6 +387,16 @@ class Synchrotron:
coef_yy = np.array([det.A3 / 2, 0]) coef_yy = np.array([det.A3 / 2, 0])
self.adts = [coef_xx, coef_yx, coef_xy, coef_yy] self.adts = [coef_xx, coef_yx, coef_xy, coef_yy]
def get_chroma(self, order=4, dpm=0.02, n_points=100):
fit, dpa, tune = at.physics.nonlinear.chromaticity(
self.ring.optics.lattice,
method='linopt',
dpm=0.02,
n_points=100,
order=order)
chrox, chroy = fit
return chrox, chroy
def get_mcf_order(self, add=True, show_fit=False): def get_mcf_order(self, add=True, show_fit=False):
""" """
Compute momentum compaction factor up to 3rd order from AT lattice. Compute momentum compaction factor up to 3rd order from AT lattice.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment