diff --git a/mbtrack2/tracking/synchrotron.py b/mbtrack2/tracking/synchrotron.py index b41093411771ad3f5ef9004141183477705e3534..41458eff38988e909c1f3c90b2d4863c0a3e12ae 100644 --- a/mbtrack2/tracking/synchrotron.py +++ b/mbtrack2/tracking/synchrotron.py @@ -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