@_rates_preprocess<EOL><INDENT>def event_rate(self, stride, start=None, end=None, timecolumn=None):<DEDENT>
<EOL>from gwpy.timeseries import TimeSeries<EOL>times = self[timecolumn]<EOL>if times.dtype.name == '<STR_LIT:object>':  <EOL><INDENT>times = times.astype('<STR_LIT>', copy=False)<EOL><DEDENT>nsamp = int(ceil((end - start) / stride))<EOL>timebins = numpy.arange(nsamp + <NUM_LIT:1>) * stride + start<EOL>return TimeSeries(<EOL>numpy.histogram(times, bins=timebins)[<NUM_LIT:0>] / float(stride),<EOL>t0=start, dt=stride, unit='<STR_LIT>', name='<STR_LIT>')<EOL>
Calculate the rate `~gwpy.timeseries.TimeSeries` for this `Table`.

        Parameters
        ----------
        stride : `float`
            size (seconds) of each time bin

        start : `float`, `~gwpy.time.LIGOTimeGPS`, optional
            GPS start epoch of rate `~gwpy.timeseries.TimeSeries`

        end : `float`, `~gwpy.time.LIGOTimeGPS`, optional
            GPS end time of rate `~gwpy.timeseries.TimeSeries`.
            This value will be rounded up to the nearest sample if needed.

        timecolumn : `str`, optional
            name of time-column to use when binning events, attempts
            are made to guess this

        Returns
        -------
        rate : `~gwpy.timeseries.TimeSeries`
            a `TimeSeries` of events per second (Hz)

        Raises
        ------
        ValueError
            if the ``timecolumn`` cannot be guessed from the table contents