nearest_frame_to_timepoint ======================================================== .. py:function:: petpal.utils.useful_functions.nearest_frame_to_timepoint(frame_times: numpy.ndarray) -> collections.abc.Callable[[float], float] Returns a step function that gets the index of the frame closest to a provided timepoint based on an array of frame times, such as the frame starts or reference times. :param frame_times: The frame times on which to generate the step function. :type frame_times: np.ndarray :returns: *nearest_frame_func (Callable[[float],float])* -- A function that returns the time closest to the provided timepoint.