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

Home » Public Forums » archive » Re: Irregular grid -> 2D binned
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: Irregular grid -> 2D binned [message #49416 is a reply to message #49413] Sat, 22 July 2006 02:42 Go to previous messageGo to previous message
will[1] is currently offline  will[1]
Messages: 6
Registered: July 2006
Junior Member
Excellent, thank you! (and here I was going to do it all so manually).

will

jgc wrote:
> have a look at GRIDDATA and GRID_INPUT functions, this last with
> DUPLICATES=Avg
>
> J.
>
> will wrote:
>> I've sucked it up, I think I need a push in the right direction.
>> Imagine that I have a long (~6 million points) list of data that
>> includes three fields: latitude, longitude, abundance. The lats and
>> lons are all over the place (i.e. no regular grid) and I'd like to bin
>> them into an image. Additionally I'd like to average abundance of each
>> bin to be the color for the image.
>>
>> I can use the reverse indices keword in histogram. I can even use mean
>> pretty well. I can get a binned histogram using histo_2D. But I'm
>> having a hard time thinking about how to go from the reverse indices of
>> histogram to the histo_2D case which doesn't offer the same keyword.
>> The only way I can think of to do this is to:
>>
>> a) do a histogram of the latitudes (using RI)
>> b) do a histogram of the longitudes (using RI)
>> c) find the intersection of indices for each bin that I want
>> d) "flatten" the lat, lon, indices/abund cube with matrix
>> multiplication
>>
>> It's the "c" part I'm sketched out on, my brain's can't think around
>> anything but a very evil Loop.
>>
>> Has this really easy or been answered here before? (Array decimation
>> was the closest thing I found).
>>
>> Thanks in advance!
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Irregular grid -> 2D binned
Next Topic: Re: plot dirac delta function?

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

Current Time: Fri Oct 10 02:18:29 PDT 2025

Total time taken to generate the page: 0.56130 seconds