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

Home » Public Forums » archive » Re: 3-dimensional integration? [IDL 5.4]
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: 3-dimensional integration? [IDL 5.4] [message #35533 is a reply to message #35521] Tue, 24 June 2003 07:18 Go to previous messageGo to previous message
Ingo Salzmann is currently offline  Ingo Salzmann
Messages: 10
Registered: December 2002
Junior Member
Thanx! Unfortunately I forgot to mention, that my data points are
irregularely spaced. I would choose the approach to Triangulate [...]
TRIGRID [...] the data and then follow your hint. But ... what is the
relationship between the old irregularely spaced points described by their
(x,y,int) tuples and the new points within the (n,n,int) array? Are these
coordinates normalized?
Thank you!

"Timm Weitkamp" <timm.weitkamp@nowhere.edu> schrieb im Newsbeitrag
news:Pine.LNX.4.44.0306231600060.1635-100000@localhost.local domain...
> Oops! When I just wrote,
>
>> Circular regions take more than one line, but are easily doable too.
>> Assume that r is the radius of the circle over which you want to
>> integrate (in pixels). Then you should do something like this:
>>
>> dim = SIZE(data, /DIMENSIONS)
>> xarr = findgen(dim[0]) # (1+fltarr(dim[1]))
>> yarr = findgen(dim[1]) ## (1+fltarr(dim[0]))
>> rarr = SQRT((xarr-x)^2 + (yarr-y)^2)
>> idxList = WHERE(rarr LE r, npix)
>> IF npix NE 0 THEN tot = TOTAL(data[idxList])
>
> ... I hit the "send" key too early. The code above works, but its last two
> lines can (and should) be merged into the more elegant
>
> tot = TOTAL( (rarr LE r) * data )
>
> I think this way of directly using a logical expression for indexing,
> which in many cases I find very handy, is sometimes ignored by the
> worshipers of WHERE.
>
> Timm
>
> --
> Timm Weitkamp <http://people.web.psi.ch/weitkamp>
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: sec : U Re: Sinc interpolation
Next Topic: Re: How to do nested objects??

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

Current Time: Fri Oct 10 12:33:54 PDT 2025

Total time taken to generate the page: 1.84331 seconds