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

Home » Public Forums » archive » Re: Mode and variation of cells in multiple grids (3-D problem)
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: Mode and variation of cells in multiple grids (3-D problem) [message #69625] Fri, 29 January 2010 04:58 Go to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On Jan 28, 10:47 am, Ed Hyer <ejh...@gmail.com> wrote:
> On Jan 26, 8:37 pm, Jeremy Bailin <astroco...@gmail.com> wrote:
>
>>> ; map values into their index in uniqvals so we only need to
>>> ; deal with integers
>>> mappedgrids = value_locate(uniqvals, allgrids)
>>> ; now we can use histogram!
>>> ; first give each pixel its own increment so that the histogram for
>>> ; the pixels run from 0..nuniq-1, nuniq..2*nuniq-1, etc.
>>> pixincrement = ((lindgen(gridsize[0]) # replicate(1,gridsize[1])) + $
>>>   (lindgen(gridsize[1]) ## replicate(1,gridsize[0]) * gridsize[0])) *
>>> nuniq
>
> :slow clap:
>
> Nicely done!

Thanks. :-)=

You might run into memory problems if nuniq is much greater than the
number of grids, since the histogram ends up being nuniq x nx x ny but
only at most ngrid x nx x ny of the elements can be non-zero. I've
been thinking about ways around that, but it gets complicated!

-Jeremy.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Reading McIDAS Grid files
Next Topic: Re: CURSOR skips a few beats :-(

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

Current Time: Sat Oct 11 04:56:01 PDT 2025

Total time taken to generate the page: 4.48212 seconds