anchor.diff:  
   
   
  -  function KLrxi_point(j,xpos,chxstype,tnumEigsin) result(KL_point)
  +  function KLrxi_point(j,xpos,chxstype,tnumEigsin,orderin) result(KL_point)
     !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 solve any derivative order of the KL process with optional argument 'orderin'.
     !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, &
  -                    sigsmeanadjust, sigameanadjust
  +  use genRealzvars, only: lamc, scatrat, Coscat, Coabs
  +  use KLvars, only: alpha, Ak, Eig, numEigs, KLrxivals, flmatbasedxs
     use utilities, only: Heavi
   
     integer :: j
  
positive.code:   real(8) :: KL_point
    character(*) :: chxstype
    integer, optional :: tnumEigsin
  
    real(8) :: sigt, siga, sigs, KL_sum
    integer :: curEig,tnumEigs
    real(8) :: Eigfterm
  
    tnumEigs = merge(tnumEigsin,numEigs,present(tnumEigsin))
  
    !solve summation of KL terms to use below
    KL_sum = 0d0
    do curEig=1,tnumEigs
      Eigfterm = Eigfunc(Ak(curEig),alpha(curEig),lamc,xpos)
      KL_sum   = KL_sum + sqrt(Eig(curEig)) * Eigfterm * KLrxivals(j,curEig)
    enddo
  
    if(.not.flmatbasedxs) then
      !determine underlying value
      sigt = sigave + meanadjust + KL_sum
      !determine point value
      select case (chxstype)
        case ("total")
  
negative.code:   elseif(flmatbasedxs) then
      !cross section values
      if(chxstype .ne. 'scatter') &
        siga = tsigabsave  + tsigameanadjust + sqrt(Coabs)  * KL_sum
      if(chxstype .ne. 'absorb') &
        sigs = tsigscatave + tsigsmeanadjust + sqrt(Coscat) * KL_sum
      !determine point value
      select case (chxstype)
        case ("total")
  