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

Home » Public Forums » archive » Re: pixelwise regression for time series images
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: pixelwise regression for time series images [message #70890] Thu, 13 May 2010 09:14
David Fanning is currently offline  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 Go to previous message
Craig Markwardt is currently offline  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 Go to previous message
David Fanning is currently offline  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 Go to previous message
David Fanning is currently offline  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 Go to previous message
Bringfried Stecklum is currently offline  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)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Formatting WRITE_CSV output
Next Topic: Help on EDGE_DOG

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

Current Time: Mon Oct 13 04:33:07 PDT 2025

Total time taken to generate the page: 1.51867 seconds