@_rates_preprocess<EOL><INDENT>def binned_event_rates(self, stride, column, bins, operator='<STR_LIT>',<EOL>start=None, end=None, timecolumn=None):<DEDENT>
<EOL>from gwpy.timeseries import TimeSeriesDict<EOL>if not bins:<EOL><INDENT>bins = [(-numpy.inf, numpy.inf)]<EOL><DEDENT>if operator == '<STR_LIT>' and not isinstance(bins[<NUM_LIT:0>], tuple):<EOL><INDENT>bins = [(bin_, bins[i+<NUM_LIT:1>]) for i, bin_ in enumerate(bins[:-<NUM_LIT:1>])]<EOL><DEDENT>elif isinstance(operator, string_types):<EOL><INDENT>op_func = parse_operator(operator)<EOL><DEDENT>else:<EOL><INDENT>op_func = operator<EOL><DEDENT>coldata = self[column]<EOL>out = TimeSeriesDict()<EOL>for bin_ in bins:<EOL><INDENT>if isinstance(bin_, tuple):<EOL><INDENT>keep = (coldata >= bin_[<NUM_LIT:0>]) & (coldata < bin_[<NUM_LIT:1>])<EOL><DEDENT>else:<EOL><INDENT>keep = op_func(coldata, bin_)<EOL><DEDENT>out[bin_] = self[keep].event_rate(stride, start=start, end=end,<EOL>timecolumn=timecolumn)<EOL>out[bin_].name = '<STR_LIT:U+0020>'.join((column, str(operator), str(bin_)))<EOL><DEDENT>return out<EOL>
Calculate an event rate `~gwpy.timeseries.TimeSeriesDict` over
        a number of bins.

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

        column : `str`
            name of column by which to bin.

        bins : `list`
            a list of `tuples <tuple>` marking containing bins, or a list of
            `floats <float>` defining bin edges against which an math operation
            is performed for each event.

        operator : `str`, `callable`
            one of:

            - ``'<'``, ``'<='``, ``'>'``, ``'>='``, ``'=='``, ``'!='``,
              for a standard mathematical operation,
            - ``'in'`` to use the list of bins as containing bin edges, or
            - a callable function that takes compares an event value
              against the bin value and returns a boolean.

            .. note::

               If ``bins`` is given as a list of tuples, this argument
               is ignored.

        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, default: ``time``
            name of time-column to use when binning events

        Returns
        -------
        rates : ~gwpy.timeseries.TimeSeriesDict`
            a dict of (bin, `~gwpy.timeseries.TimeSeries`) pairs describing a
            rate of events per second (Hz) for each of the bins.