LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2-D peak detector

Hello,
I'm looking for a VI that will search through a 2-D array and search for
primary and secondary peaks. Labview seems to have a VI to do this in 1-D but I have
a function z=f(x,y). I want to find the 2 indices for the secondary peaks (a
distinct peak but not necessarily the largest). If the program fit a gaussian or
similar to determine sub-index accuracy that would be even better. If there are no
VIs that are currently written for this, what do you think the best method would be
to write it? (My array size is 1000x1000.)

Many thanks in advance...

Jim

*****************************************************************************
* Jim Bickford Tufts University * So many worlds, so much to do. *
* http://www.tufts.edu
/~jbickfor * So little done, such things to be. *
* jbickfor@emerald.tufts.edu * - Alfred, Lord Tennyson *
*****************************************************************************
0 Kudos
Message 1 of 3
(3,332 Views)
Good thread-- I'll be watching this one.

In general I wish LV had more 2D array calculus. In addition to finding
peaks in z=f(x,y) I could personally use an efficient vector gradient
function, e.g. del(z). Anyone?

While on the topic, does anyone else find the 3D graphtypes new in 5.1 to
be a bit picky in terms of how the x,y arrays are ordered? They must be
"rasterized"... unfortunately my data is often not organized that way. A
set of pre-digestion utilities to make data ready for the 3D graphers would
be valuable.

Best regards,

--Scott Jordan
scottj@ricochet.net
0 Kudos
Message 2 of 3
(3,332 Views)
Jim Bickford wrote:
>
> Hello,
> I'm looking for a VI that will search through a 2-D array and search for
> primary and secondary peaks. Labview seems to have a VI to do this in 1-D but I have
> a function z=f(x,y). I want to find the 2 indices for the secondary peaks (a
> distinct peak but not necessarily the largest). If the program fit a gaussian or
> similar to determine sub-index accuracy that would be even better. If there are no
> VIs that are currently written for this, what do you think the best method would be
> to write it? (My array size is 1000x1000.)
>
> Many thanks in advance...
>
> Jim
>
> *****************************************************************************
> * Jim Bickford Tufts University * So many worlds, so
much to do. *
> * http://www.tufts.edu/~jbickfor * So little done, such things to be. *
> * jbickfor@emerald.tufts.edu * - Alfred, Lord Tennyson *
> *****************************************************************************


Jim,
you could use the 'array max & min' vi. Once you have the max, you could
replace that entry with 0 (save the original entry) and search for the
next max. When you're done, restore the 0 entry to the original value.

Walter
0 Kudos
Message 3 of 3
(3,332 Views)