def slice_df(df, start_end):
    """
    This slices a dataframe when the index column is the time. This function slices the dataframe 'df' between a window
    defined by the 'start_end' parameter. Time is given in seconds.
    """

    inds = (df.index >= start_end[0]) & (df.index < start_end[1])
    return df[inds]