Open b-remy opened 2 years ago
Only shear inference works well eventually, just had to clean the code:
next step:
tf.function
when samplingI am now letting free the shear and the galaxies intrinsic ellipticities (for 25 galaxies) and there is convergence:
In this example gamma2
is biased. I expect this bias to be reduced if I increase the number of galaxies for inference. This is my next experiment. Then I will let the galaxies hlr
free as well to fit all the Gaussian profiles shape parameters.
Nice :-) Hummmm.... I would expect you would have larger error bars but I don't see why you would get much of a bias on gamma 2.... That's unexpected...
Yes I agree. Then I suspect that it is because I am trying to infer zero shear for gamma2
. If I remember correctly, the gradients of the current interpolator are not well defined for zero shear, maybe it is inducing a bias... I'll try with non zero shear for both gamma1
and gamma2
Two runs the for inference of shear and galaxies ellipticities, it seems to work well (19483e0)
Next step: fit also the radius and the flux
Inference of 25 galaxy ellipticities, radius and constant shear (2e1205d):
So this a good news and what we wanted to demonstrate with this issue!
I think now we can try to see how the shear inference responds when we don't have the same model in the simulations (more complex like sersic profiles) and in the forward model (e.g. gaussians).
I made a first try with Gaussian profiles and odd pixel size without success yet... https://colab.research.google.com/drive/1_O1Li9NunvmXjedZtTf2AmdBFvDd7DZm?usp=sharing
In this notebook galaxy and psf profiles are fixed, only the shear is free so I expected that the problem was simpler than @EiffL previous experiement (https://colab.research.google.com/drive/1w2W_ISV_7sMYry7VzPFWTWk1b71AcBge?usp=sharing#scrollTo=xnZGlmijI7k-).
So I guess there is something wrong in what I did, maybe there are too much profiles or I should let the hlr free or there is not enough noise