'Get location and latency of peak amplitude.
Parameters
tmin : float | None
The minimum point in time to be considered for peak getting.
tmax : float | None
The maximum point in time to be considered for peak getting.
mode : {\'pos\', \'neg\', \'abs\'}
How to deal with the sign of the data. If \'pos\' only positive
values will be considered. If \'neg\' only negative values will
be considered. If \'abs\' absolute values will be considered.
Defaults to \'abs\'.
vert_as_index : bool
whether to return the vertex index instead of of its ID.
Defaults to False.
time_as_index : bool
Whether to return the time index instead of the latency.
Defaults to False.
Returns
pos : int
The vertex exhibiting the maximum response, either ID or index.
latency : float
The latency in seconds.'

def get_peak(self, tmin=None, tmax=None, mode='abs', vert_as_index=False, time_as_index=False):

    (vert_idx, time_idx) = _get_peak(self.data, self.times, tmin, tmax, mode)
    return ((vert_idx if vert_as_index else self.vertices[vert_idx]), (time_idx if time_as_index else self.times[time_idx]))
