def extract_signals(data, fs, segmentation_times):
    """
    Signal that given the set of segmentation times, extract the signal from the raw trace.
    Args:
        data : Numpy
            The input seismic data containing both, start and end times of the seismic data.
        fs : float
            The sampling frequency.
        segmentation_times : list
            A list containing the segmentation of the file

    Returns:
    List
        A list containing the extracted signals.
    """
    signals = []
    durations = []
    for m in segmentation_times:
        segmented = data[int(m[0] * fs): int(m[1] * fs)]
        signals.append(segmented)
        durations.append(segmented.shape[0]/float(fs))

    return signals, durations