The content of this page has not been vetted since shifting away from MediaWiki. If you’d like to help, check out the how to help guide!
A BAR script (written in BeanShell) that retrieves local maxima and minima from an ImageJ plot. The easiest way to install Find Peaks is by subscribing to the BAR update site.
Options<div class="thumbnail" >
<a href="/media/plugins/findpeakssnapshot.png" data-lightbox="image-findpeakssnapshot-png"> <span class="thumbnail-group"><img src="/media/plugins/findpeakssnapshot.png" width="380" /></span> </a> <span markdown="1">Analysis of synthetic data plotted from a .csv file. CSV files can be imported into ImageJ by drag and drop, or by using <span class="bc"><span>File</span> › <span>Import</span> › <span>Results</span></span>. Once [options](#options) are specified, coordinates of retrieved peaks are logged to the table of a new plot window'</span>
The smallest depth (in Y-axis units) that a qualified valley must exceed. By default, it is set to one standard deviation of the data.
Min. value of maxima
The smallest value (in Y-axis units) a qualified maxima must exceed. This filter is disabled when set to NaN (Not a Number).
Max. value of minima
The highest value (in Y-axis units) a qualified minima must not exceed. This filter is disabled when set to NaN (Not a Number).
Min. peak distance
The smallest separation between peaks (in X-axis units). When this value is not zero (the default), smaller peaks within the specified vicinity will be ignored. This works in the following way: 1) Identified peaks that fulfill all of the above criteria are sorted in descending order (largest to smallest amplitude); 2) Beginning with the largest peak, the script ignores all remaining peaks that are not separated by more than the specified Min. peak distance. Applies to both maxima and minima.
Exclude peaks on edges of plot
If active, a peak is only accepted if it is separated by two qualified valleys. If disabled (the default), peaks at the limits of the data range (i.e., flanked only by one valley) are also considered.
If active, the Plot’s table will be displayed (as frontmost window), allowing values to be saved programmatically when calling Find Peaks from other macros or scripts. Examples:
// From an ImageJ macro run("Find Peaks", "min._peak_amplitude=35 min._peak_distance=0 min._value=NaN max._value=NaN list"); saveAs("Results", "/Path/to/Output/Directory/Plot Values.csv"); run("Close"); // From a script IJ.run("Find Peaks", "min._peak_amplitude=35 min._peak_distance=0 min._value=NaN max._value=NaN list"); IJ.saveAs("Results", "/Path/to/Output/Directory/Plot Values.csv"); WindowManager.getActiveWindow().close()
- Both maxima and minima are listed in descending order, from the largest to smallest amplitude
- Peaks with flat tops are retrieved at their centers
- Peak coordinates are logged according to the following layout: [X0,Y0]: Original data; [X1,Y1]: Maxima; [X2,Y2]: Minima
- Min. peak distance can be used for peak width filtering
- Use Scientific notation and Decimal places in Analyze › Set Measurements… to improve the representation of values that are too big or too small to be displayed in the decimal form
- Find Peaks was initially though as a complementary tool for Sholl Analysis but it that can be applied to any dataset. For this reason, it is now part of BAR
Analysis of 1D-signals was discussed in March 2014 on the ImageJ mailing list. That discussion highlighted the following alternatives to Find Peaks:
- PeakFinder Tool by Norbert Vischer, a macro tool that retrieves intensity peaks along a straight line ROI.
- Multi-Peak fitting using R by Kota Miura, a Jython script that calls the R package Peaks. Requires Rserve (instructions)
- Fast Filters plugin by Michael Schmid, a collection of unidirectional filters that can be applied to to rows or columns in an image (instructions).
The easiest way to install Find Peaks is by subscribing to the BAR update site.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.