Jess
2005-09-05 02:36:45 UTC
Hi,
I am attempting to do multi-Gaussian fitting of 1D profiles using Craig
Markwardt's mpfitfun, and the simple multi_gauss script kindly offered
in earlier advice to Ben Tupper on non-interactive multi Gaussian
fitting. I believe I should be able to make it work, as for each
profile I know the number of gaussians involved, 3-parameter Gaussians
are sufficient, and each of those parameters are fixed or heavily
constrained. I am using a starting parameter array P of size P =
fltarr(n_gauss), and parinfo to apply my constraints.
One constraint I am unable yet to do is: I = would like to be able to
tie the peak flux of the Gaussians such that the peak flux of last
Gaussian is always greater than that of the first Gaussian.
I tried using
parinfo((n_gauss-1)*3).tied = 'GT P[0]'
However the tied structure of parinfo doesn't seem to be meant to
accept operators like GT,LT, etc. The alternative is to use the limits
structure and saying that the lower limit of peakflux on last gaussian
must be greater than upper limit of peak flux on first gaussian with:
parinfo((n_gauss-1)*3).limited(0) = 1
parinfo((n_gauss-1)*3).limits(0) = parinfo(0).limits(1)
However this requires assigning rather tight bounds to P[0] which I
really dont know well. Is there a smarter way I can do this using
'tied' or another structure in parinfo?
Thanks,
Jess
I am attempting to do multi-Gaussian fitting of 1D profiles using Craig
Markwardt's mpfitfun, and the simple multi_gauss script kindly offered
in earlier advice to Ben Tupper on non-interactive multi Gaussian
fitting. I believe I should be able to make it work, as for each
profile I know the number of gaussians involved, 3-parameter Gaussians
are sufficient, and each of those parameters are fixed or heavily
constrained. I am using a starting parameter array P of size P =
fltarr(n_gauss), and parinfo to apply my constraints.
One constraint I am unable yet to do is: I = would like to be able to
tie the peak flux of the Gaussians such that the peak flux of last
Gaussian is always greater than that of the first Gaussian.
I tried using
parinfo((n_gauss-1)*3).tied = 'GT P[0]'
However the tied structure of parinfo doesn't seem to be meant to
accept operators like GT,LT, etc. The alternative is to use the limits
structure and saying that the lower limit of peakflux on last gaussian
must be greater than upper limit of peak flux on first gaussian with:
parinfo((n_gauss-1)*3).limited(0) = 1
parinfo((n_gauss-1)*3).limits(0) = parinfo(0).limits(1)
However this requires assigning rather tight bounds to P[0] which I
really dont know well. Is there a smarter way I can do this using
'tied' or another structure in parinfo?
Thanks,
Jess