Closed iskren-y-g closed 5 years ago
@ibusko?
I am afraid that we don't provide the capability to fix a single parameter, such as the center of the ellipse, or its position angle, or ellipticity. What the code can do is to fix the entire ellipse and just extract the intensity sample and output it.
I believe the reason for not allowing fixing a single parameter was originally that the fit depends on all four parameters at once. When iterating to find the best ellipse that minimizes residuals, the algorithm increments, at each iteration, one single parameter at a time. In this process, if one or more parameters aren't allowed to change, the iterations can either get stuck at a fixed ellipse, or diverge.
I have a recollection of running experiments on this a long ago, when initially developing the algorithm under the IRAF system (circa 1990). Can't recall details, but I am pretty sure that I adopted the all-or-nothing solution after verifying that behavior. This is also probably the reason the minimum number of iterations is > 1.
It will be great if this can be implemented. The IRAF's ellipse task (stsdas.analysis.isophote) can run ellipse fitting in which you can specify whether you would like to fix certain parameters. This is very useful where for one reason or the other, there might not be a very clear center or you just want to enforce a fixed PA.
@iskren-y-g I will run some experiments to see how it performs. In case it works fine, we can put in the ability to fix parameters.
Great, that sounds excellent! And it is important in certain cases ... Thanks for looking into this!
Added in #922.
Hi,
is it possible fix (not fit) the center or ellipticity or PA with Ellipse or ellipse.fit_image? Maybe I missed it, but it is unclear to me from the documentation whether this is possible. In certain cases this is very important.
Thanks, Iskren