If what you want to do is to set the current values as starting parameters for the whole dataset you can do it more conveniently, parameter by parameter, using Parameter.assign_current_value_to_all() . Probably it would be good to have an equivalent of this function in Model that acts on all the active components.
An alternative way to avoid these sort of problems is to use a mask to instruct the fitter not to fit at certain positions where you know that it won't fit well.
Another possibility (that requires new development) is to calculate the reduced chi square after each fit and, e.g. if it is found to be much worst than that of the previous position or bigger than a certain threshold, then the result of the fit is not used as starting parameters for the next position.
Does these help you with your problem?
Best,
Francisco
PS: by the way, because this post can be of general interest I have carbon copied hyperspy-users. Could you reply to that post instead?
Dear everyone,when using multifit to fit big spectrum images I have been running into the same problem. The single fit works fine on single spectra, and multifit can deal with the fitting until some pixel breaks it and it ceases to give good results. Please find attached to this email a picture to illustrate this behavior.I have tried to set the initial parameters for the fit a) generally with the parameter.value, and, b) using parameter.map['values'] for each pixel. But I don't know which is really used for initial parameter in the individual fits performed by multifit.I think that this problem may come from the updating of each individual fit. Each parameter in the components of the model being updated to the result, through parameter.value, instead of the initial parameter.value or the value in parameter.map['values'].My question is, which are the input parameters for each individual fit in multifit, and how can one set them beforehand?Thanks everyone,Alberto.--
You received this message because you are subscribed to the Google Groups "hyperspy-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hyperspy-deve...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "hyperspy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hyperspy-user...@googlegroups.com.