b-remy / gems

GEnerative Morphology for Shear
MIT License
0 stars 0 forks source link

GRF Shear prior #10

Open b-remy opened 2 years ago

b-remy commented 2 years ago

This issue is to track the development of a varying shear model.

In this model, instead of sampling shear values, we sample convergence map from a Gaussian Random Field.

Assuming a cosmology and a redshift distribution, we create a GRF prior for the E-mode of the convergence (and assume the B-mode is zero). Shear maps are then computed using KS transformation, and shear is measured on galaxy position by interpolation. Here is the related code (forward model, sampling shear maps).

As a first try, I simulated observations by sampling:

MAP

Initialization was done sampling from the prior distribution.

As decribed in #issue-vi, optimization is in two steps:

1) Adam(lr=1e-1) for 100 iterations:

image

2) Adam(lr=1e-2) for 100 iterations:

image

Here as well, the hlr parameter is well fitted, but galaxy ellipticities and shear field are a bit off.

image image

Expected shear

image

Obtained shear

image

I need to try with more galaxies per pixel to see if it constrains more the model. But I wanted to ask you if the size and resolution of the map were not problematic @EiffL .

VI

I haven't started to run VI with the varying shear field.

b-remy commented 2 years ago

Update result for the MAP: rescaling the parameters to the same scale helps the inference.

With Adam(lr=1e-2) for 300 steps

image

Here is the convergence MAP (kB is zero by construction):

Capture d’écran 2022-04-06 à 17 25 51

An the associated shear maps

Capture d’écran 2022-04-06 à 17 27 07