SSD
       end

       % weigh each mode by its probability (via its residual)
       logprob = Emode/(2*noise^2);
       logprob = logprob - min(logprob);
       Pmode = exp(-logprob)/sum(exp(-logprob));

       % viz all posterior modes
       bar(1:Ns,Pmode);
       title(['case ' num2str(c) '   k = ' num2str(kk) '  :  posterior mass on all C(n,k) modes'],'fontsize',14)
       xlabel('mode #'), axis([0.5 Ns+.5 0 1]); drawnow

       % what if you had equal-weighting?
       %Pmode = ones(Ns