anchor.diff:          return
         end select ! case (lnSplit(3))
       else
  -      tmpSet=1
  +      tmpi2=1
         if(st_debug) write(lout,"(a)") "ELENS> Applying read rms of delta distribution with min dispersion (default)"
       end if
  -    if (nelens.gt.0) elens_iSet(nelens)=tmpSet
  +    if (nelens>0) elens_iSet(nelens)=tmpi2
          
  -    if (nSplit.ge.4) then
  +    if (nSplit>=4) then
         select case (chr_toLower(trim(lnSplit(4))))
         case('all')
           elens_emin_def=-one
  -        elens_sigdpp_def=tmpSigDpp
  -        elens_iSet_def=tmpSet
  +        elens_sigdpp_def=tmpflt
  +        elens_iSet_def=tmpi2
           do tmpi1=1,nelens-1
             elens_emin(tmpi1) = elens_emin_def
             elens_iSet(tmpi1) = elens_iSet_def
  
positive.code:       write(lout,"(a,1pe22.15)") "ELENS> - new value [mm]=",elens_r2(j)
      end if
      ! compute electron sigma out of normalised settings
      if (elens_sig(j).lt.zero) then
        oldVal=elens_sig(j)
        if (elens_emin(j).gt.zero) then ! betatron cut
          elens_sig(j)=abs(elens_sig(j))*sqrt(elens_optVal(j)*elens_emin(j)/(e0f/nucm0))
        else ! momentum cut
          elens_sig(j)=abs(elens_sig(j))*(elens_optVal(j)*elens_sigdpp(j))
  
negative.code:       write(lout,"(a,i0)") "ELENS> WARNING INTERpolation setting for an ELENS type without radial profile - ignoring setting..."
        return
      end if
      call chr_cast(lnSPlit(2), tmpi2,iErr)
      if ( tmpi2 <=0 .or. tmpi2>20 ) then
        write(lerr,"(a,i0)") "ELENS> ERROR Unreasonable number of points for radial interpolation, got ",tmpi2
        write(lerr,"(a)")    "ELENS>       Please choose a value beterrn 1 and 20 (included)"
        iErr = .true.
        return
      end if
      if (nelens>0) elens_radial_mpoints(nelens)=tmpi2
      
      if (nSplit>=3) then
        select case (chr_toLower(trim(lnSplit(3))))
        case('all')
          elens_radial_mpoints_def=tmpi2
          do tmpi1=1,nelens-1
            elens_radial_mpoints(tmpi1) = elens_radial_mpoints_def
          end do
          if(st_debug) write(lout,"(a)") "ELENS> Setting elens_radial_mpoints as read to all e-lenses"
        case('bef','before')
          do tmpi1=1,nelens-1
            elens_radial_mpoints(tmpi1) = tmpi2
          end do
          if(st_debug) write(lout,"(a)") "ELENS> Setting elens_radial_mpoints as read to all e-lenses "// &
               "declared before the current FOX line"
        case('aft','after')
          elens_radial_mpoints_def=tmpi2
          if(st_debug) write(lout,"(a)") "ELENS> Setting elens_radial_mpoints as read to all e-lenses "// &
               "declared after the current FOX line"
        case default
  