# Can get\_peak function specify the maximum or minimum value?

**URL:** <https://mne.discourse.group/t/can-get-peak-function-specify-the-maximum-or-minimum-value/2673>\
**Category:** Support & Discussions\
**Tags:** eeg\
**Created:** [February 6, 2021, 11:49am UTC](https://mne.discourse.group/t/can-get-peak-function-specify-the-maximum-or-minimum-value/2673 "2021-02-06T11:49:55Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![richard](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/richard/32/15_2.png) [@richard](https://mne.discourse.group/u/richard)\
**Post date:** [February 6, 2021, 4:25pm UTC](https://mne.discourse.group/t/can-get-peak-function-specify-the-maximum-or-minimum-value/2673/2 "2021-02-06T16:25:00Z")

</div>

[`Evoked.get_peak()`](https://mne.tools/stable/generated/mne.Evoked.html#mne.Evoked.get_peak) can search for peaks in the following ways:

1. take the absolute value of the data (i.e., turn everything into non-negative values), and find the largest value of that (that’s the default, `mode='abs'`)

2. only consider positive values (i.e., `>0`), and find the highest value (`mode='pos'`)

3. only consider negative values (i.e., `<0`), and find the smallest value (`mode='neg'`)

There is currently no way to use `get_peak()` to find the smallest value of a signal that’s always positive; or the largest value of a signal that’s exclusively negative.

---

_[View the full topic](https://mne.discourse.group/t/can-get-peak-function-specify-the-maximum-or-minimum-value/2673)._
