anchor.diff:      end if
   
       if(st_debug) then
  -      call sixin_echoVal("normalised emittance [m rad]",elens_emin(nelens),"ELENS",iLine)
  +      call sixin_echoVal("normalised emittance [m rad]",tmpEmin,"ELENS",iLine)
       end if
       
     case("SIGDPP")
  
positive.code:         return
        end select ! case (lnSplit(3))
      else
        elens_iSet(nelens)=1
        if(st_debug) write(lout,"(a)") "ELENS> Applying read normalised emittance with min beta (default)"
      end if
         
      if (nSplit.ge.4) then
        select case (chr_toLower(trim(lnSplit(4))))
        case('all')
          elens_emin_def=elens_emin(nelens)
          do tmpi1=1,nelens-1
            elens_emin(tmpi1) = elens_emin_def
          end do
          if(st_debug) write(lout,"(a)") "ELENS> Applying read normalised emittance to all e-lenses"
        case('before')
          do tmpi1=1,nelens-1
            elens_emin(tmpi1) = elens_emin(nelens)
          end do
          if(st_debug) write(lout,"(a)") "ELENS> Applying read normalised emittance to all e-lenses"// &
               "declared before the current EMIN line"
        case('after')
          elens_emin_def=elens_emin(nelens)
          if(st_debug) write(lout,"(a)") "ELENS> Applying read normalised emittance to all e-lenses"// &
               "declared after the current EMIN line"
        case default
          write(lerr,"(a)") "ELENS> ERROR Unidentified fourth parameter of EMIN line, got: '"//trim(lnSplit(4))//"'"
  
negative.code:   end if
   
    write(lout,"(a)") "ELENS> LinOpt for element: '"//trim(bez(iElem))//"'"
    write(lout,"(a,1pe22.15)") "ELENS> recorded value of beta/disp:",elens_optVal(ielens(iElem))
    
    if(st_debug) then
      write(lout,"(a,2(1x,f16.6))") "ELENS>        * Alpha X/Y:        ",bAlpha
      write(lout,"(a,2(1x,f16.6))") "ELENS>        * Beta X/Y:         ",bBeta
      write(lout,"(a,2(1x,f16.6))") "ELENS>        * Dispersion X/Y:   ",bDisp
      write(lout,"(a,2(1x,f16.6))") "ELENS>        * Dispersion XP/YP: ",bDispP
      write(lout,"(a,2(1x,f16.6))") "ELENS>        * Orbit X/Y:        ",bOrbit
      write(lout,"(a,2(1x,f16.6))") "ELENS>        * Orbit XP/YP:      ",bOrbitP
    end if
   
  end subroutine elens_setOptics
  