function [indexOfThresh] = FirstThresh(waveform,thresh)
    indexsOfUseful = find( waveform(:) > thresh );
    indexOfThresh = indexsOfUseful(1);
end