anchor.diff:  
   
     function KLrxi_point(j,xpos,chxstype,tnumEigsin) result(KL_point)
  -  !!Evaluates KL reconstructed realizations at a given point.
  -  !!It has options for total, scattering only, or absorption only cross sectional values.
  -  !!It has an option to solve for less than the available number of eigenvalues.
  -  !!It can function when in 'material'-based or 'totxs'-based mode.
  -  !!It can function when adjusting mean or not adjusting mean.
  -  !!In some of these settings this function calls itself.
  +  !Evaluates KL reconstructed realizations at a given point.
  +  !It has options for total, scattering only, absorption only, or scattering ratio.
  +  !It has an option to solve for less than the available number of eigenvalues.
  +  !It can function when in 'material'-based or 'totxs'-based mode.
  +  !It can function when adjusting mean or not adjusting mean.
     use genRealzvars, only: lamc, scatrat, Coscat, Coabs, sigscatave, sigabsave, &
                             sigave
     use KLvars, only: alpha, Ak, Eig, numEigs, KLrxivals, meanadjust, flmatbasedxs, &
  
positive.code: 
  
  
    function KLrxi_integral(j,xl,xr)
    !This function integrates on KL reconstructed realizations from xl to xr.
    !Integration is always on total cross section, but 'material'- or 'totxs'-
    !cross sections are adjusted with or without meanadjust.
    use genRealzvars, only: lamc, sigave, Coscat, Coabs
    use KLvars, only: alpha, Ak, Eig, numEigs, KLrxivals, meanadjust, flmatbasedxs
  
    integer :: j
    real(8) :: xl,xr
    real(8) :: KLrxi_integral
  
    integer :: curEig
    real(8) :: Eigfintterm, Coterm
  
    if(flmatbasedxs) then
      Coterm = (sqrt(Coscat)+sqrt(Coabs))**2
    elseif(.not.flmatbasedxs) then
      Coterm = 1.0d0
    endif
  
    KLrxi_integral = 0d0
    do curEig=1,numEigs
      Eigfintterm = Eigfuncint(Ak(curEig),alpha(curEig),lamc,xl,xr)
      KLrxi_integral = KLrxi_integral + sqrt(Eig(curEig)) * &
                                             Eigfintterm * KLrxivals(j,curEig)
    enddo
    KLrxi_integral = (sigave + meanadjust) * (xr - xl) + (sqrt(Coterm) * KLrxi_integral)
  
    end function KLrxi_integral
  
  
negative.code:   intsigave = 0d0
    do j=1,KLrnumRealz
      intsigave = intsigave + &
                  KLrxi_integral(j,0d0,s,chxstype='total')/KLrnumRealz/s
    enddo
    500 format("  Integrator/reconstruction check - sigave: ",f8.5,"  intsigave: ",f8.5,"  relerr: ",es10.2)
    write(*,500) sigave,intsigave,abs(sigave-intsigave)/sigave
  