===============================================================
 
      THIS ROUTINE PRODUCES
      X, Y, S RMS ENVELOPE  [MM]
      EX, EY, ES  RMS EMITTANCE [MM MRAD]
 
      the second order moments are store in the matrix XM
      which belongs to a common incorporated in common-2Dsc-beam.f
 
      XM(i,1) = average[Xi*Xi]   i=x,y,s  [M^2]
      XM(i,2) = average[PXi*PXi] i=x,y,s  [RAD^2]
      XM(i,3) = average[Xi*PXi]  i=x,y,s  [M*RAD]
 
      the output is
 
      EXi = 4 SQRT(average[Xi*Xi] average[PXi*PXi]  -  average[Xi*PXi]^2 )
      Xi  = SQRT( average[Xi*Xi] )
 
 
      output units: EX,EY,ES    [MM MRAD]
                     X, Y, S    [MM]
 
      the beam needs to be loaded in the common "beam"
 
 
 ===============================================================
 
subroutine rmsoutput(EX,EY,ES,X,Y,S)
 
COMMONS: 
common-initi.f
common-2Dsc-beam.f
common-2Dsc-simulation.f
 
SUBROUTINES USED:
  messages_n
 
micromap-index
Mon Jul 17 08:57:40 CEST 2017