'calculate histogram values
does not do any plotting
I don\'t remember what I wanted here, looks similar to the new cdf
method, but this also does a binned pdf (self.histo)'

def histogram(self, idx=None, critval=None):

    if (self.mcres.ndim == 2):
        if (not (idx is None)):
            mcres = self.mcres[:, idx]
        else:
            raise ValueError('currently    only    1    statistic    at    a    time')
    else:
        mcres = self.mcres
    if (critval is None):
        histo = np.histogram(mcres, bins=10)
    else:
        if (not (critval[0] == (- np.inf))):
            bins = np.r_[((- np.inf), critval, np.inf)]
        if (not (critval[0] == (- np.inf))):
            bins = np.r_[(bins, np.inf)]
        histo = np.histogram(mcres, bins=np.r_[((- np.inf), critval, np.inf)])
    self.histo = histo
    self.cumhisto = ((np.cumsum(histo[0]) * 1.0) / self.nrepl)
    self.cumhistoreversed = ((np.cumsum(histo[0][::(-1)])[::(-1)] * 1.0) / self.nrepl)
    return (histo, self.cumhisto, self.cumhistoreversed)
