Closed fadinammour closed 3 years ago
The optimal value of gamma is 2 after testing the values in [0.1 0.5 1 2 10] in this notebook.
However when measuring the ellipticity error, we notice that it decreases when the magnitude increase. The magnitude plot has the opposite behavior than the SNR plot. Which means that the ellipticity error behavior is counter intuitive.
Note : Adapative moments are measured using a window (see section 2.1 of Hirata & Seljak 2003) so this measure is biased and this could be the reason why its error behavior is not correlated with the ellipticity one.
Test to better understand the ellipticity error behavior:
By replacing the mean by the median in the plots this notebook. The general trend remains the same which means that it is most likely not caused by outliers.
After checking the galaxy images per bin at the end of this notebook, two effects has been noticed that seem to explain the behavior of the ellipticity error curve.
The first effect is having elongated galaxies having reconstruction that are more punctual as seen in the example below. This is probably due to the prevalence of smaller galaxies in the dataset distribution.
The second effect is having smaller objects for lower magnitudes and also having observation that contain mostly noise. This seems to lead the network to guess a galaxy which would most likely have a punctual shape that corresponds to the target most of the time, like in the example below:
When the trade-off parameter of the shape constraint, γ, is set to 2. The reconstruction of elongated galaxies seem to be more successful in comparison to the absence of constraint, see example below:
And behavior of the ellipticity error for this value decreases when the magnitude increases which corresponds better to the expected behavior.
The unwindowed ellipticity measurement on the Unet reconstructions contain a considerable proportion of outliers which values are outside [-1, 1]. This is due to the residual noise in the reconstructions. Even though the intensity of the residual noise in the reconstruction is very low (see plot below), it is still enough to drastically deteriorate the unwindowed ellipticity measure.
This leads us to only consider the windowed shape measurement.
For further details, the problem was investigated in: https://github.com/CosmoStat/ShapeDeconv/blob/master/notebooks/UNET_Evaluation/unet_window_investigation.ipynb