==========================================================
 
      this subroutine compute the single particle tune:
      tune is computed after two application of this routine.
      It is needed the common tunespacecharge1 and the variable nnd1g
      have to be set to 0. This is done automatically if the
      the initialization of the main program is done through the
      routine INITIPARAMETER.
 
      Since the method compute only the fractional part of the tunes
      then at qx qy the integer part part should be added.
 
      nsuper is the number of superperiods of the ring;
      qx123, qy123 are tunes computed for checking their values are
      bigger then 1 in the cell you aset_re investigating.
      qxx00, qyy00 are tunes you can add to set the integer tune to
      the correct value.
 
      the tune stored are:
 
      qx =qx*dfloat(nsuper) + qxx00
 
      qxg,qyg  are the average value of the tunes computed by
      each one of the particles.
 
      nregt is a flag: if nregt = 0 you compute the tune of the
      np-th particles.
      if nregt = 1 then you compute the tune of each particle in
      the beam.
 
      the internal register nppp fixes the maximum number of tunes
      which are plotted in the file of unit 33
 
 ===========================================================
 
subroutine tunesp(nregt,np,qxg,qyg,qx123,qy123,qxx00, qyy00)
 
COMMONS: 
common-initi.f
common-2Dsc-beam.f
common-2Dsc-simulation.f
 
SUBROUTINES USED:
 y if the
  messages_n
 
micromap-index
Mon Jul 17 08:57:40 CEST 2017