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

Home » Public Forums » archive » Re: Avoiding loop stats
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: Avoiding loop stats [message #52152 is a reply to message #52149] Fri, 19 January 2007 19:07 Go to previous messageGo to previous message
yp is currently offline  yp
Messages: 42
Registered: February 2005
Member
Hi JD,
I have already written only few the simplest stats functions (stdev,
covar, etc) inspired by NASA average.pro function to tackle the
dimension issue. I could not spend much time to write e.g., a full
regression analysis. I was expecting a clever syntactic way to play
with the IDL in-built functions. But it is good to know that I must
rewrite the functions.
Thanks for your suggestion,
yas



On Jan 19, 6:11 pm, JD Smith <jdsm...@as.arizona.edu> wrote:
> Yes, recode st_func to work on the full data cube at once. Sometimes
> this is easier said than done. Let's imagine your st_func just
> calculates the standard deviation. Unfortunately, IDL's built-in
> statistics functions are almost all array-unaware, but some things are
> easy to do "by hand":
>
> s=size(data,/DIMEN)
> mean=total(data,3)/s[2]
> stddev=sqrt(total((data-rebin(mean,s))^2)/(s[2]-1))
>
> Higher moments could be built as well. The "threadable" or
> array-aware statistics/math functions (since IDL v5.6, anyway), are
> MIN, MAX, MEDIAN, TOTAL, PRODUCT, SMOOTH, and CONVOL (any other I'm
> missing?).
>
> ITTVIS could invest a small amount of effort to improve this state of
> affairs. For instance, it would be trivial to rewrite MOMENT.PRO to
> take a DIMENSION keyword, such that VARIANCE, STDDEV, MEAN, SKEWNESS,
> KURTOSIS could all be array-aware.
>
> JD- Hide quoted text -- Show quoted text -
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: nicing idl at startup from idlwave
Next Topic: ascii value of a char

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

Current Time: Sun Nov 30 05:25:03 PST 2025

Total time taken to generate the page: 1.44031 seconds