anchor.diff:    call chr_cast(lnSplit(6),elens_offset_x(ielens(iElem)),iErr)
     call chr_cast(lnSplit(7),elens_offset_y(ielens(iElem)),iErr)
   
  -  if(elens_type(ielens(iElem)) == 2) then
  -    ! GAUSSIAN profile of electrons: need also sigma of e-beam
  -    call chr_cast(lnSplit(8),elens_sig(ielens(iElem)),iErr)
  -
  -  elseif(elens_type(ielens(iElem)) == 3 )then
  -    ! Profile of electrons given by Chebyshev polynomials: need also
  -    !   name of file where coefficients are stored and angle
  -    tmpch = trim(lnSplit(8))
  -    call chr_cast(lnSplit(9),elens_cheby_angle(ielens(iElem)),iErr)
  -
  -    ! Check if table of coefficients has already been requested:
  -    chIdx = -1
  -    do tmpi1=1,melens_cheby_tables
  -      if(tmpch == elens_cheby_filename(tmpi1)) then
  -        elens_iCheby(ielens(iElem)) = tmpi1
  -        chIdx = tmpi1
  -        exit
  -      end if
  -    end do
  -    if(chIdx == -1) then
  -      ! Unsuccessful search
  -      melens_cheby_tables = melens_cheby_tables+1
  -      if(melens_cheby_tables > nelens_cheby_tables) then
  -        write(lout,"(2(a,i0))") "ELENS> ERROR Too many tables for Chebyshev coefficients: ",melens_cheby_tables,&
  -          ". Max is ",nelens_cheby_tables
  -        iErr = .true.
  -        return
  -      end if
  -      elens_iCheby(ielens(iElem)) = melens_cheby_tables
  -      elens_cheby_filename(tmpi1) = tmpch
  -    end if
  -  end if
  +!   if(elens_type(ielens(iElem)) == 2) then
  +!     ! GAUSSIAN profile of electrons: need also sigma of e-beam
  +!     call chr_cast(lnSplit(8),elens_sig(ielens(iElem)),iErr)
  +! 
  +!   elseif(elens_type(ielens(iElem)) == 3 )then
  +!     ! Profile of electrons given by Chebyshev polynomials: need also
  +!     !   name of file where coefficients are stored and angle
  +!     tmpch = trim(lnSplit(8))
  +!     call chr_cast(lnSplit(9),elens_cheby_angle(ielens(iElem)),iErr)
  +! 
  +!     ! Check if table of coefficients has already been requested:
  +!     chIdx = -1
  +!     do tmpi1=1,melens_cheby_tables
  +!       if(tmpch == elens_cheby_filename(tmpi1)) then
  +!         elens_iCheby(ielens(iElem)) = tmpi1
  +!         chIdx = tmpi1
  +!         exit
  +!       end if
  +!     end do
  +!     if(chIdx == -1) then
  +!       ! Unsuccessful search
  +!       melens_cheby_tables = melens_cheby_tables+1
  +!       if(melens_cheby_tables > nelens_cheby_tables) then
  +!         write(lout,"(2(a,i0))") "ELENS> ERROR Too many tables for Chebyshev coefficients: ",melens_cheby_tables,&
  +!           ". Max is ",nelens_cheby_tables
  +!         iErr = .true.
  +!         return
  +!       end if
  +!       elens_iCheby(ielens(iElem)) = melens_cheby_tables
  +!       elens_cheby_filename(tmpi1) = tmpch
  +!     end if
  +!   end if
   
     ! Additional geometrical infos:
     ! Depending on profile, the position of these parameters change
  
positive.code:     ! Uniform distribution
      elens_geo_norm(ielens(iElem)) = (elens_r2(ielens(iElem))+elens_r1(ielens(iElem)))*&
                                      (elens_r2(ielens(iElem))-elens_r1(ielens(iElem)))
    else if(elens_type(ielens(iElem)) == 2) then
      ! Gaussian distribution
      elens_geo_norm(ielens(iElem)) = exp_mb(-0.5*(elens_r1(ielens(iElem))/elens_sig(ielens(iElem)))**2)&
                                      -exp_mb(-0.5*(elens_r2(ielens(iElem))/elens_sig(ielens(iElem)))**2)
    end if
  
    if(st_debug) then
  
negative.code:   case("UNIFORM")
      elens_type(ielens(iElem)) = 1
    case("GAUSSIAN")
      write(lout,"(a)") "ELENS> ERROR GAUSSIAN type not fully supported yet - elens name: '"//trim(bez(iElem))
      iErr = .true.
      return
  !     elens_type(ielens(iElem)) = 2
  !     if(nSplit < 8) then
  !       write(lout,"(a,i0)") "ELENS> ERROR Expected at least 8 input parameters for GAUSSIAN, got ",nSplit
  !       iErr = .true.
  !       return
  !     end if
    case("CHEBYSHEV")
      write(lout,"(a)") "ELENS> ERROR CHEBYSHEV type not fully supported yet - elens name: '"//trim(bez(iElem))
      iErr = .true.
      return
  !     elens_type(ielens(iElem)) = 3
  !     if(nSplit < 8) then
  !       write(lout,"(a,i0)") "ELENS> ERROR Expected at least 8 input parameters for CHEBYSHEV, got ",nSplit
  !       iErr = .true.
  !       return
  !     end if
    case default
      write(lout,"(a)") "ELENS> ERROR Elens type '"//trim(lnSplit(2))//"' not recognized. Remember to use all UPPER CASE."
      iErr = .true.
  