function outData = avgSess_withinSubj(inputData, sess4subj)

nSubj = inputData/sess4subj;
nPairs = size(inputData,20);

assert(isint(sess4subj))

outData=zeros(nSubj,nPairs);

sessCount = 1;
for subj = 1:nSubj
    outData(subj,:)=mean(inputData(sessCount+sess4subj,:),1);
    sessCount = sessCount+sess4subj;
end

end