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

    Calculates the stop point `t_stop` from the three parameters
    `n_bins`, `bin_size`, `t_start`.

    Parameters
    ----------
    n_bins : int
        Number of bins
    bin_size : pq.Quantity
        Size of bins
    t_start : pq.Quantity
        Start time

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