comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How to Find Bimodal peak values in an array
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How to Find Bimodal peak values in an array [message #74868] Sun, 06 February 2011 06:05
Gray is currently offline  Gray
Messages: 253
Registered: February 2010
Senior Member
On Feb 6, 12:55 am, vijay <vijayans...@gmail.com> wrote:
> hi friends,
>
>            i have  an array/image of 512x512 and want to find maximum
> value in each row (similar to Craig B. Markwardt 'CMAPPLY' but it
> results in one dimensional array).
>
> 1) I want the maximum of each row in an array in same location as that
> of input array (other values tend to be zero).
>
> 2) Moreover, each row of my input array contains bimodal peak, i also
> want that second maximum/peak in each row and that to be resulted in
> the same output array.
>
>     Thus, the final 2dimensional array should have first and second
> maximum/peak in each row and remaining tends to zero.
>
> note: i mean the second maximum is similar to bimodal pattern second
> maximum.

Well, you can try something like:
IDL> output_array = 0.*input_array
IDL> peak1 = max(input_array,ind,dimension=1)
IDL> output_array[ind] = peak1
IDL> tmp = input_array
IDL> tmp[ind] = 0.
IDL> peak2 = max(temporary(tmp),ind,dimension=1)
IDL> output_array[ind] = peak2
[Message index]
 
Read Message
Previous Topic: license manager error
Next Topic: Re: find bimodal maximum in each row

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:26:07 PDT 2025

Total time taken to generate the page: 0.00229 seconds