def waveinfo(es, i, channel):
    """Returns 4 values:  peak-to-trough amplitude difference, peak-to-trough time difference, min amplitude, and max amplitude for all events on the specified channel."""
    w = es.get_spike_waveform(i, channel)
    min = 0
    max = 0
    tmin = 0
    tmax = 0
    for j in range(0,len(w)):
        if w[j] > max:
            max = w[j]
            tmax = j
        if w[j] < min:
            min = w[j]
            tmin = j
    return (max-min), (tmin-tmax), min, max