Re: pixelwise regression for time series images [message #70890] |
Thu, 13 May 2010 09:14 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Craig Markwardt writes:
> Heh, I still think in round () array indices. To me, the notation
> thing is a wash. Switching to [] indexing makes less confusion with
> function calls. On the other hand, use of [] is confused with the
> array constructor, x = [a,b,c].
I'm willing to make an exception for anyone still using
IDL 4.0. :-)
By the way, I spent the evening talking to a friend
about IDL 8. I get more and more excited about this
daily. I wish I had more time to play with it.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
|
|
|
Re: pixelwise regression for time series images [message #70891 is a reply to message #70890] |
Thu, 13 May 2010 08:51  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
On May 13, 8:28 am, David Fanning <n...@dfanning.com> wrote:
> Bringfried Stecklum writes:
>> One can do that without loops. Just write down the regression equations, keeping
>> in mind that the summation has to be done for the 3rd dimension. Actually this
>> is what I like about IDL, you can think of bigger entities than just a single
>> value. I attached a function which works for me.
>
> Wow. Aside from how elegant this is, it really makes
> you appreciate how hard it was to read IDL code
> before the advent of square brackets, doesn't it? :-)
Heh, I still think in round () array indices. To me, the notation
thing is a wash. Switching to [] indexing makes less confusion with
function calls. On the other hand, use of [] is confused with the
array constructor, x = [a,b,c].
Craig
|
|
|
Re: pixelwise regression for time series images [message #70893 is a reply to message #70891] |
Thu, 13 May 2010 07:48  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Bringfried Stecklum writes:
> One can do that without loops. Just write down the regression equations, keeping
> in mind that the summation has to be done for the 3rd dimension. Actually this
> is what I like about IDL, you can think of bigger entities than just a single
> value. I attached a function which works for me.
Looks like we might also need "ima2cube".
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
|
|
|
Re: pixelwise regression for time series images [message #70894 is a reply to message #70893] |
Thu, 13 May 2010 05:28  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Bringfried Stecklum writes:
> One can do that without loops. Just write down the regression equations, keeping
> in mind that the summation has to be done for the 3rd dimension. Actually this
> is what I like about IDL, you can think of bigger entities than just a single
> value. I attached a function which works for me.
Wow. Aside from how elegant this is, it really makes
you appreciate how hard it was to read IDL code
before the advent of square brackets, doesn't it? :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: pixelwise regression for time series images [message #70895 is a reply to message #70894] |
Thu, 13 May 2010 02:57  |
Bringfried Stecklum
Messages: 75 Registered: January 1996
|
Member |
|
|
blofton wrote:
> I’ve written a program that uses LINFIT to calculate a linear model to
> each pixel in a multitemporal, registered series of images. That is,
> I fit a line in the time (z-) dimension at each x,y pixel location.
> However, I am using nested loops to do this and it takes a while to
> run. For larger images (1024X1024) there is no hope. I am wondering
> if you’ve come across a better (IDL-esque) method of doing this; I’ve
> not seen anything online.
>
> Thanks for any suggestions,
>
> brad
One can do that without loops. Just write down the regression equations, keeping
in mind that the summation has to be done for the 3rd dimension. Actually this
is what I like about IDL, you can think of bigger entities than just a single
value. I attached a function which works for me.
Regards,
Bringfried
-
Attachment: lincfit.pro
(Size: 1.34KB, Downloaded 99 times)
|
|
|