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

Home » Public Forums » archive » FIT across images
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: FIT across images [message #66008 is a reply to message #65891] Wed, 08 April 2009 05:23 Go to previous messageGo to previous message
bas.basetta is currently offline  bas.basetta
Messages: 2
Registered: March 2009
Junior Member
Hi all,
just to let you know, I now figured it out.

I messed it up with

a. wrong dimensions of “F”, which has to be the same as “fit”
b. bad use of the * “simple” matrix product.

To simplify matrix products I reformed the S matrix as [n,size,size]
to [n,m], where m=size*size, and so A to [3,m]. I then used the
function

iv=replicate(1,(size(x,/dimensions))[0])
bx = EXP(-x#A[1,*])
F = (iv#A[0,*]) * bx + iv#A[2,*]

where x is now [n] and F is [n,m]. The procedure

fit=mpcurvefit(x,dummyS,W,A,sigma,function_name='expmap',chi sq=chisq,/
noderivative,/quiet)

now works, with fit=[n,m], and produces the same results as the double
forloop procedure does. The funny thing is: it is one hundred times
slower. Maybe there is a lesson to learn here.

Have fun,
Bas
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Positive solution for linear equations
Next Topic: Re: What exactly does the command "strech" do to the colormap?

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

Current Time: Sat Oct 11 10:25:01 PDT 2025

Total time taken to generate the page: 1.28400 seconds