Parameters and MPFIT [message #46658] |
Thu, 08 December 2005 03:11  |
luxx11
Messages: 4 Registered: December 2005
|
Junior Member |
|
|
Hi, I'm using MPFIT and MPFITFUN from Craig Markwardt.
I have one parameter which can be -1 or 1, nothing else, but I'm having
problems to do this with PARINFO.
Probably there is an easier way to do it but I am setting
limits=[-1,1], then I set the min and the max step to 2. I thought that
this would do keep this parameter in -1 or in 1, but I get values like
0.8 or 0.9. Any ideas?
thanks
luxx
|
|
|
|
Re: Parameters and MPFIT [message #46741 is a reply to message #46658] |
Fri, 09 December 2005 11:37  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
luxx11@gmail.com writes:
> Hi, I'm using MPFIT and MPFITFUN from Craig Markwardt.
>
> I have one parameter which can be -1 or 1, nothing else, but I'm having
> problems to do this with PARINFO.
>
> Probably there is an easier way to do it but I am setting
> limits=[-1,1], then I set the min and the max step to 2. I thought that
> this would do keep this parameter in -1 or in 1, but I get values like
> 0.8 or 0.9. Any ideas?
I agree with JD's suggestions, as long as your chi-squared space is
not too complicated.
MPFIT optimizes continuous parameters. What you want is a discrete
optimizer, which MPFIT is not. Since you only have one parameter with
two possible values it seems easiest to just do as JD suggests and try
both possible values and see which is best.
Happy fitting,
Craig
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|