anchor.diff:      ! Valid channels
       allocate(iselect(nc))
       iselect = pack((/(ic,ic=1,ncf)/), any(valid==1, dim=odim))
  +    if(zuseteof==1)then
  +        allocate(iselect2(ns))
  +        iselect2 = pack((/(ic,ic=1,ns)/), any(valid==1, dim=2))
  +    endif
  +    iselect = pack((/(ic,ic=1,ncf)/), any(valid==1, dim=odim))
       if(nkeep>nc)then
           if(present(errmsg))then
               if(zuseteof==1)then
  
positive.code:     ! EOF decomposition
      ! =================
  
      ! Covariance
      ! -----------
      allocate(nn(nc,nc))
      allocate(cov(nc,nc))
      cov = 0d0
  
negative.code:             zuseteof=0
          endif
      endif
      zusetpc = present(pc) .and. zuseteof==1 .and. (.not. present(notpc) .or. notpc==0)
      znkeepmax=100
      if(zuseteof==1)then
          nc = ntv
  