def percentile(self, percentile):
rows, columns = self.shape<EOL>out = numpy.zeros(rows)<EOL>for i in range(rows):<EOL><INDENT>cumsumvals = numpy.cumsum(self.value[i, :])<EOL>abs_cumsumvals_minus_percentile = numpy.abs(cumsumvals -<EOL>percentile)<EOL>minindex = abs_cumsumvals_minus_percentile.argmin()<EOL>val = self.bins[minindex]<EOL>out[i] = val<EOL><DEDENT>name = '<STR_LIT>' % (self.name, percentile)<EOL>return FrequencySeries(out, epoch=self.epoch, channel=self.channel,<EOL>frequencies=self.bins[:-<NUM_LIT:1>], name=name)<EOL>
Calculate a given spectral percentile for this `SpectralVariance`

        Parameters
        ----------
        percentile : `float`
            percentile (0 - 100) of the bins to compute

        Returns
        -------
        spectrum : `~gwpy.frequencyseries.FrequencySeries`
            the given percentile `FrequencySeries` calculated from this
            `SpectralVaraicence`