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

Home » Public Forums » archive » Re: why is amoeba not working ??
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: why is amoeba not working ?? [message #54932] Wed, 18 July 2007 01:36
wlandsman@jhu.edu is currently offline  wlandsman@jhu.edu
Messages: 12
Registered: September 2006
Junior Member
"trex" <Terry.Suer@gmail.com> wrote in message
news:1184722537.753989.104610@d30g2000prg.googlegroups.com.. .
> I am trying to do a image subtraction minimization using amoeba.
> When I try running the code below I get this error. Any ideas?

AMOEBA requires that the supplied function return a *scalar* value, whereas
your FUNC is returning an array the same size as the two images. You might
insert a TOTAL() into the last line of FUNC so that it returns a scalar,
e.g.

res = total( abs(s - xyshift( (i*q[2]), q[0], q[1])) )

though I think I would instead prefer to maximize the correlation
coefficient of the two images. --Wayne

>
> REPLICATE: Expression must be a scalar in this context: <DOUBLE
> Array[201, 151]>.
> % Execution halted at: AMOEBA 161 /opt/rsi/idl/lib/
> amoeba.pro
> % $MAIN$ 28 /home/idl/func.pro
>
>
>
> FUNCTION FUNC,q
>
> i=mrdfits('/home/imcen.fits',/silent)
> s=mrdfits('/home/spcen.fits',/silent)
> res = s-xyshift((i*q[2]),q[0],q[1])
>
> return,res
> END
[Message index]
 
Read Message
Previous Topic: Re: URL Parsing for wget in IDL
Next Topic: Vertical text alignment in postscript

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

Current Time: Sun Oct 12 02:24:18 PDT 2025

Total time taken to generate the page: 0.71985 seconds