Finding the peak value of a 2D wave

Hi,

I am wondering if there is an fast way (then going through all entries) to find the peak of a 2D wave, returning:

1. The peak value
2. The location as x and y values (2D wave center is (x=0,y=0)

It seems FindPeak function is 1D only.

If you want the maximum value in the wave, use WaveStats. If you are truly trying to do something like what FindPeak does, it is difficult. If your 2D wave has just one reasonably obvious peak you could do a curve fit to Gauss2D, but that's not fast.

In reply to by johnweeks

I see, thanks for the ideas.

In fact the 2D waves I am considering are rather small, it may not worth it to do much more than a for-loop and just compare.
A better way maybe to just transform it to 1D wave, find the peak there, and note down the coordinate by counting the row and column. Not sure if this is faster.

In reply to by Sandbo

It seems to me that the simplest solution for you is ImageStats, giving the peak value and location.

DisplayHelpTopic "ImageStats"
V_max   Maximum pixel value.
V_maxColLoc Specifies the location of the column in which the maximum pixel value was found or the first eligible column if no single column was found.
V_maxRowLoc Specifies the location of the row in which the maximum pixel value was found or the first eligible row if no single maximum was found.