anchor.diff:  
     ! Find the profile name referenced
     do i=1,scatter_nPro
  -    if(trim(scatter_cData(scatter_PROFILE(i,1))) == lnSplit(3)) then
  +    if(scatter_proList(i)%proName == lnSplit(3)) then
         profileID = i
         exit
       end if
  
positive.code:       return
      end if
  
      ! Request space to store the density
      tmpIdx = scatter_nfData + 1
      scatter_PROFILE(scatter_nPro,3) = tmpIdx
      scatter_nfData = scatter_nfData + 3
      call alloc(scatter_fData, scatter_nfData, zero, "scatter_fData")
  
      call str_cast(lnSplit(4),scatter_fData(tmpIdx),  iErr) ! Density
      call str_cast(lnSplit(5),scatter_fData(tmpIdx+1),iErr) ! Mass
      call str_cast(lnSplit(6),scatter_fData(tmpIdx+2),iErr) ! Momentum
  
      call str_cast(lnSplit(4),fParams(1),iErr) ! Density
      call str_cast(lnSplit(5),fParams(2),iErr) ! Mass
      call str_cast(lnSplit(6),fParams(3),iErr) ! Momentum
  
    case("FIXED")
      scatter_PROFILE(scatter_nPro,2) = 2 ! Integer code for FIXED
      proType = 2
      if(nSplit /= 4) then
        write(lout,"(a)") "SCATTER> ERROR PROfile type FIXED expected 4 arguments:"
        write(lout,"(a)") "SCATTER>       PRO name FIXED density[targets/m^2]"
  
negative.code:   real(kind=fPrec) beamtot, sigmaX, sigmaY, offsetX, offsetY
    integer tmpIdx
  
    select case(scatter_proList(idPro)%proType)
    case (1)  ! FLAT
      retval  = scatter_proList(idPro)%fParams(1)
  
    case (2)  ! FIXED
      retval  = scatter_proList(idPro)%fParams(1)
  
    case (10) ! GAUSS1
      beamtot = scatter_proList(idPro)%fParams(1)
      sigmaX  = scatter_proList(idPro)%fParams(2)
      sigmaY  = scatter_proList(idPro)%fParams(3)
      offsetX = scatter_proList(idPro)%fParams(4)
      offsetY = scatter_proList(idPro)%fParams(5)
      retval  = ((beamtot/(two*(pi*(sigmaX*sigmaY)))) &
        * exp_mb(-half*((x-offsetX)/sigmaX)**2))      &
        * exp_mb(-half*((y-offsetY)/sigmaY)**2)
  
    case default
      write(lout,"(a,i0,a)") "SCATTER> ERROR Type ", scatter_proList(idPro)%proType," for profile '"//&
        trim(scatter_proList(idPro)%proName)//"' not understood."
      call prror(-1)
    end select
  
  