mpfit question [message #78786] |
Tue, 20 December 2011 09:02  |
Russell[1]
Messages: 101 Registered: August 2011
|
Senior Member |
|
|
I searched these pages thinking this has been raised. I'm sure this
is my mistake or misunderstanding, but if anyone has advice I'm all
ears.
I'm using mpfit.pro as part of a multi-stage fitting routine to model
the spectra of galaxies (1) brute-force fit over a grid of models, (2)
mpfit to refine that solution so it's "off-the-grid", and (3) run an
MCMC to marginalize over a few parameters --- the initial conditions
of each stage are taken from the previous stage. I know certain
parameters must be constrained within a range (for example, the
distance cannot be negative), so I'm using that in the parinfo
structure. For most galaxies this procedure works perfectly, but
occasionally, I run into a problem child where the covariance matrix
as returned by mpfit has a column (and row) of all 0.0. I'm using
this covariance matrix as initial proposal distribution for the MCMC,
so things go haywire when this happens. I suspect the column/row of
zeroes is because that parameter hit the boundary or isn't properly
varied in the LM-fitting. Does anyone have any experience with this?
Will the parameters GTOL, XTOL, FTOL help? Or is this a problem with
the entries in the parinfo structure (such as STEP or RELSTEP)?
Thanks!
Russell
|
|
|