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

Home » Public Forums » archive » Re: Speed-up of code
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: Speed-up of code [message #67861 is a reply to message #67860] Tue, 25 August 2009 08:36 Go to previous messageGo to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Aug 25, 10:16 am, Philip Elson <philipel...@googlemail.com> wrote:


> My assumption is that the HISTOGRAM function will be helpful, but
> having spent quite some time on this I am beginning to think that it
> cannot be done - though I would love to be proved wrong by any
> histogram guru out there.

I think you want to read the "drizzling" article on David's Web page
(http://www.dfanning.com/code_tips/drizzling.html ). (Your question
differs only in that in you want to average the values rather than sum
them).

I think "Histogram plus cumulative total" usually had the winning
time:

h = HISTOGRAM(day, REVERSE_INDICES=ri)
nh = N_ELEMENTS(h)
sortData = value[ri[nh+1:*]]
totSortData = [0., TOTAL(sortData, /CUMULATIVE)]
vec8 = totSortData[ri[1:nh]-nh-1] - $
totSortData[ri[0:nh-1]-nh-1]
print,vec8/h ;May need to check for zero values first

--Wayne
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Histogram Too Many Array Elements
Next Topic: Re: Digits in IDL

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

Current Time: Fri Oct 10 14:59:52 PDT 2025

Total time taken to generate the page: 0.96150 seconds