Open b-remy opened 2 years ago
Also sometimes it infers -gamma_1
insted of gamma_1
.
The last version of the code is working well as illustrated in #5 .
I'll try to reproduce the issue I had above. In this scenario there were to calls to the model, which may trouble the code idk...
with ed.tape() as true_params:
ims = model(N*N, stamp_size)
# Apply a constant shear on the field
custom_shear = [0.01, 0.]
with ed.condition(hlr=true_params['hlr'],
gamma=custom_shear,
e=true_params['e'],
):
ims = model(N*N, stamp_size)
This pull request contains a lot of code a files, but can be summarized as follow:
gems/ed_utils.py
enables batch computation through edward likelihoodsgems/models.py
contains all the probabilistic models that I implemented so far (we may want to split this file into pieces in the future)gems/psf.py
is a utils file to get some psf models (not used in the latest PGM where we provide the PSF as input to the model, but needed for other scripts as scripts/simpler_model.py
)gems/shear.py
contains code modeling the shear at the map level assuming a GRF priorgems/utils.py
utils code, mostly for the shear map modelscripts/cosmo_shear_paramtric.py
and scripts/cosmo_shear_real.py
are scripts running inference on PGM using sersic light profiles to fit observations with 1) real galaxies 2) parametric galaxiesscripts/simpler_model.py
script to demonstrate model bias on observations generated with light profile only (e.g. gaussians on gaussians, gaussians on sersics, ...)scripts/varying_shear_gaussians.py
is a script to perform inference using a PGM with a shear GRF priorMerging this pull request would close the following issues:
This pull request is to document the implementation of a script for the joint inference of shear and shape for #5 .
So far, we assume:
Remarks:
tf.function
was enable by removing all non-tensorflow code in the edward model