MethodicalAcceleratorDesign / MAD-X

MAD-X repository
Other
49 stars 39 forks source link

Noise and noise max #943

Closed tpersson closed 3 years ago

tpersson commented 4 years ago

The noise for the multipoles are not documented and I also find the implementation strange (see below). It is not really noise but a sinusoidal function and then it is also added up for each order..

Is anyone using this or can we simply remove it? All of this can also be achived by the macro..

if (noise .eq. 1) then nn1 = name_len noisemax = node_value('noisemax ') ! 2015-Jun-11 12:37:29 ghislain: should insert a guard for noisemax < 100 NPEAK(:noisemax) = zero ; call get_node_vector('npeak ',nn1,npeak) NTUNE(:noisemax) = zero ; call get_node_vector('ntune ',nn1,ntune) NLAG(:noisemax) = zero ; call get_node_vector('nlag ',nn1,nlag)

 temp = 0
 do in = 1, noisemax
    temp = temp + npeak(in) * sin(nlag(in) + ntune(in) * turn)
 enddo
 NORMAL(:nn) = NORMAL(:nn) * (1+temp)
 SKEW(:nn)   = SKEW(:nn)   * (1+temp)

endif

tpersson commented 3 years ago

After discussing this implementation doesn't make much sense and will therefore not be documented.