def _calc_tstop(num_bins, binsize, t_start):
    """
    Calculates the stop point from given parameters.

    Calculates the stop point `t_stop` from the three parameters
    `num_bins`, `binsize`, `t_start`.

    Parameters
    ----------
    num_bins : int
        Number of bins
    binsize : pq.Quantity
        Size of bins
    t_start : pq.Quantity
        Start time

    Returns
    -------
    t_stop : pq.Quantity
        Stopping point calculated from given parameters.
    """
    if num_bins is not None and binsize is not None and t_start is not None:
        return t_start.rescale(binsize.units) + num_bins * binsize
