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

Home » Public Forums » archive » Re: orthogonal array projections
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: orthogonal array projections [message #7535] Thu, 21 November 1996 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Deb Summa <summa@lanl.gov> writes:

> I'm trying to make a 2-d projection of max amplitude in a 3-d image
> array. The following bit of Fortran-esque code does what i want,
> but it's excruciatingly slow:
>
> for k=0,n-1 do begin
> for l=0,z-1 do begin
> ayz(k,l)=max(image(low:hi,k,l)
> endfor
> endfor
>
> Is there a way to do this without using loops?

Just off-hand, here is one thing you might try to speed things
up. This will return the maximun value in each column of numbers
between low and hi.

FOR j=low, hi DO BEGIN
ayz(*,*) = ayz(*,*) > image(j, *,*)
END

David

*************************************************
* David Fanning, Ph.D.
* 2642 Bradbury Court, Fort Collins, CO 80521
* Phone: 970-221-0438 Fax: 970-221-4762
* E-Mail: davidf@dfanning.com
*
* Sometimes I go about pitying myself, and all along my
* soul is being blown by great winds across the sky.
* -- Ojibway saying
************************************************
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Window always in background
Next Topic: Re: Reading a Gzipped file in IDL?

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

Current Time: Wed Oct 08 19:18:27 PDT 2025

Total time taken to generate the page: 0.00467 seconds