diff --git a/README.md b/README.md index 2169fd1..25558ce 100644 --- a/README.md +++ b/README.md @@ -14,29 +14,14 @@
- -
+`sbi_lens` provides a range of lensing forward models, including Gaussian model, log-normal model and LPT model. Powered by JAX, our codebase is fast and fully differentiable. It is specifically designed to match LSST Y10 survey setting, but it can be easily adapted.+ +
+ + +**LPT Simulation** +``` python +# define lsst year 10 lpt model +from sbi_lens.simulator.Lpt_field import lensingLpt +model_lpt = partial( + lensingLpt, + N=60, + map_size=5, + box_size=[400.0, 400.0, 4000.0], + box_shape=[300, 300, 128], + gal_per_arcmin2=gals_per_arcmin2, + sigma_e=sigma_e, + nbins=nbins, + a=a, + b=b, + z0=z0, + with_noise=False, +) + +# simulate one mass map +from sbi_lens.simulator.utils import get_samples_and_scores + +(log_prob, samples), gradients = get_samples_and_scores( + model_lpt, PRNGKey(0), batch_size=1, with_noise=False ) -map_example = samples['y'] +map_example_lpt = samples['y'] ``` ``` python for i in range(5): subplot(1,5, i+1) - imshow(map_example[0][...,i], cmap='cividis') + imshow(map_example_lpt[0][...,i], cmap='cividis') title('Bin %d'%(i+1)) axis('off') ```- +
-Check out a full example here: [![colab link](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1pSjhrOJbVi80RQlsVz2oXhVAtxwBhSbn?usp=sharing) +Check out an example of the cool things you can do with `sbi_lens` here: [![colab link](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1pSjhrOJbVi80RQlsVz2oXhVAtxwBhSbn?usp=sharing) # Contributors diff --git a/img/compare_contour_plot.png b/img/compare_contour_plot.png deleted file mode 100644 index d2090df..0000000 Binary files a/img/compare_contour_plot.png and /dev/null differ diff --git a/img/convergence_map.png b/img/convergence_map.png deleted file mode 100644 index 1e6947b..0000000 Binary files a/img/convergence_map.png and /dev/null differ diff --git a/img/convergence_map_lognormal.png b/img/convergence_map_lognormal.png new file mode 100644 index 0000000..985f9b2 Binary files /dev/null and b/img/convergence_map_lognormal.png differ diff --git a/img/convergence_map_lpt.png b/img/convergence_map_lpt.png new file mode 100644 index 0000000..1b19f6b Binary files /dev/null and b/img/convergence_map_lpt.png differ