The optimization of isophotal ellipticity fails when the initialized ellipticity is close to 0 or 1. Because the perturbation was done after converting the ellipticity to another parameter space of $[-\infty, +\infty]$ using _inv_x_to_eps and then scaling back using _x_to_eps. The functional form makes any finite perturbation at $\epsilon \rightarrow 0$ and $\epsilon \rightarrow 1$ (corresponds to $-\infty$ and $+\infty$ in the perturbed parameter space) negligible. Since there are few galaxies with global ellipticity close to 1, the problem mostly affects nearly face-on galaxies.
|
perturbations[-1][i]["ellip"] = _x_to_eps( |
|
_inv_x_to_eps(perturbations[-1][i]["ellip"]) |
|
+ np.random.normal(loc=0, scale=perturb_scale) |
|
) |
I assume that the purpose of such scaling is to do optimization in a continuous parameter space. However, since the perturbation was done in a Monte-Carlo manner, I presume that it is not critical to do such scaling. I try directly perturbing the ellipticity and when it hits its parameter boundary I simply reflect it against the boundary.
tmp_eps = perturbations[-1][i]["ellip"] + np.random.normal(
loc=0, scale=perturb_scale
)
if tmp_eps < 0:
tmp_eps = -tmp_eps % 1
# tmp_eps = 0
elif tmp_eps > 1:
tmp_eps = 1 - tmp_eps % 1
# tmp_eps = 1
perturbations[-1][i]["ellip"] = tmp_eps
This temporary solution seems working. Let me know if you have other ideas. I would be happy to initiate a pull request when ready. Below I show a failed example and a successful fit using the new code above.


The optimization of isophotal ellipticity fails when the initialized ellipticity is close to 0 or 1. Because the perturbation was done after converting the ellipticity to another parameter space of$[-\infty, +\infty]$ using $\epsilon \rightarrow 0$ and $\epsilon \rightarrow 1$ (corresponds to $-\infty$ and $+\infty$ in the perturbed parameter space) negligible. Since there are few galaxies with global ellipticity close to 1, the problem mostly affects nearly face-on galaxies.
_inv_x_to_epsand then scaling back using_x_to_eps. The functional form makes any finite perturbation atAutoProf/autoprof/pipeline_steps/Isophote_Fit.py
Lines 628 to 631 in 8db0fd2
I assume that the purpose of such scaling is to do optimization in a continuous parameter space. However, since the perturbation was done in a Monte-Carlo manner, I presume that it is not critical to do such scaling. I try directly perturbing the ellipticity and when it hits its parameter boundary I simply reflect it against the boundary.
This temporary solution seems working. Let me know if you have other ideas. I would be happy to initiate a pull request when ready. Below I show a failed example and a successful fit using the new code above.