You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using AutoProf v0.7.3 to fit Sersic profiles to a set of galaxies with the Levenberg-Marquardt fitting method. I run into the issue that a large portion of my sample has a fitted axis ratio q = b/a ~ 1, despite not looking like circles in the data.
I believe that this is cause by the initial guess for the fit made by AutoProf misidentifying the semi-major (a) and semi-minor (b) axis. Since the fitting parameters are the semi-major axis (a) and axis ratio (q), when trying to improve on the initial guess with new iterations, the fits get 'stuck' with 'a' parameter being the size of the semi-minor axis and 'q' parameter ~ 1 (or slightly less). Note that the position angle (tilt of the ellipse) is also a parameter in the fit, but it would have to rotate by ~90 degrees to fix this issue which would be unlikely happen with this least square fitting method.
To solve this issue, I changed the prior on the 'q' parameter from 0 < q < 1 (default) to 0 < q < 10. Now the galaxies fits which where stuck at q ~ 1 go to q > 1 but with the 'a' parameter now representing the semi-minor instead of the semi-major axis. Therefor the real axis ratio, which by definition is q = b/a, now is a/b. To make everything consistent, I add in my code after the fit a line 'if q > 1: q = 1/q' so that my axis ratio still represents semi-minor/semi-major axis and are all between 0 and 1.
I have tested this solution against the SExtractor measurement for this axis ratio (ELONGATION = a/b = 1/q), and it seems to work. I have attached a plot with a sample of 400 galaxies to better visualize what I described. In blue are the galaxies with q ~ 1 and red the normal galaxies. The blue data points which were refitted with the new q prior now have a better distribution similar to the red data points, and match better the SExtractor found axis ratio. Note that the data I am using is relatively low signal and contains noise. Visual checks show that this suggested solution fixes the issue.
Best,
Jordan
The text was updated successfully, but these errors were encountered:
Hi @JordanDucatel , thanks for identifying this! First, I have to apologize for the confusion, but this project has migrated to a new name AstroPhot which can be found here: https://github.com/Autostronomy/AstroPhot . If possible, it would be great if you could update to the latest version (pip install astrophot) to see if the problem is fixed since there have been some improvements to the initialization since version 0.7.3 (we are now on version 0.14.2)
Ok, on the problem at hand, this is very interesting! I would like to keep the definition of q=b/a so perhaps we can figure out how to improve the initial parameters so that a and b don't get flipped. That said, if everything can be solved by relaxing the allowed q range, that is a workable fix. Do you have an example that you could attach so I can see how the initialization/fitting is failing?
Hello,
I am using AutoProf v0.7.3 to fit Sersic profiles to a set of galaxies with the Levenberg-Marquardt fitting method. I run into the issue that a large portion of my sample has a fitted axis ratio q = b/a ~ 1, despite not looking like circles in the data.
I believe that this is cause by the initial guess for the fit made by AutoProf misidentifying the semi-major (a) and semi-minor (b) axis. Since the fitting parameters are the semi-major axis (a) and axis ratio (q), when trying to improve on the initial guess with new iterations, the fits get 'stuck' with 'a' parameter being the size of the semi-minor axis and 'q' parameter ~ 1 (or slightly less). Note that the position angle (tilt of the ellipse) is also a parameter in the fit, but it would have to rotate by ~90 degrees to fix this issue which would be unlikely happen with this least square fitting method.
To solve this issue, I changed the prior on the 'q' parameter from 0 < q < 1 (default) to 0 < q < 10. Now the galaxies fits which where stuck at q ~ 1 go to q > 1 but with the 'a' parameter now representing the semi-minor instead of the semi-major axis. Therefor the real axis ratio, which by definition is q = b/a, now is a/b. To make everything consistent, I add in my code after the fit a line 'if q > 1: q = 1/q' so that my axis ratio still represents semi-minor/semi-major axis and are all between 0 and 1.
I have tested this solution against the SExtractor measurement for this axis ratio (ELONGATION = a/b = 1/q), and it seems to work. I have attached a plot with a sample of 400 galaxies to better visualize what I described. In blue are the galaxies with q ~ 1 and red the normal galaxies. The blue data points which were refitted with the new q prior now have a better distribution similar to the red data points, and match better the SExtractor found axis ratio. Note that the data I am using is relatively low signal and contains noise. Visual checks show that this suggested solution fixes the issue.
Best,
Jordan
The text was updated successfully, but these errors were encountered: