def get_tmin_tmax(ct_idx, chop_times, sfreq):
    """
    Get tmin and tmax for the chop interval based on the
    time points given by chop_times.

    Parameters:
    -----------
    ct_idx : int
        Index corresponding to chop_times.
    chop_times : list of float
        List with the time points of when to chop the data.
    sfreq : float
        Sampling frequency of the measurement data.

    Returns:
    --------
    tmin : int
        Starting time of the chop interval in s.
    tmax : int
        Ending time of the chop interval in s.
    """

    if ct_idx == 0:
        tmin = 0
        tmax = chop_times[ct_idx] - 1. / sfreq
        print(int(tmin), int(tmax))

    elif ct_idx == len(chop_times):
        tmin = chop_times[ct_idx - 1]
        tmax = None
        print(int(tmin), "None")

    else:
        tmin = chop_times[ct_idx - 1]
        tmax = chop_times[ct_idx] - 1. / sfreq
        print(int(tmin), int(tmax))

    return tmin, tmax