PyCOMPLETE/PyHEADTAIL

alpha_x and alpha_y in synchrotron

Closed this issue · 1 comments

In synchrotron.py alpha_x and alpha_y are just ignored:

def _construct_transverse_map(
            self, optics_mode=None,
            circumference=None, n_segments=None, s=None, name=None,
            alpha_x=None, beta_x=None, D_x=None,
            alpha_y=None, beta_y=None, D_y=None,
            accQ_x=None, accQ_y=None,
            Qp_x=None, Qp_y=None, app_x=None, app_y=None, app_xy=None,
            other_detuners=None, use_cython=None):

        if optics_mode == 'smooth':
            if circumference is None:
                raise ValueError('circumference has to be specified '
                                 'if optics_mode = "smooth"')
            if n_segments is None:
                raise ValueError('n_segments has to be specified '
                                 'if optics_mode = "smooth"')
            if s is not None:
                raise ValueError('s vector should not be provided '
                                 'if optics_mode = "smooth"')

            s = (np.arange(0, n_segments + 1) * circumference / n_segments)
 -->        alpha_x = 0.*s
            beta_x = 0.*s+beta_x
            D_x = 0.*s+D_x
 -->        alpha_y = 0.*s
            beta_y = 0.*s+beta_y
            D_y = 0.*s+D_y

In the smooth approximation we deliberately assume alpha = 0.