swagnercarena / paltas

Conduct simulation-based inference on strong gravitational lensing systems.
MIT License
13 stars 12 forks source link

Sersic sources #6

Closed JelleAalbers closed 3 years ago

JelleAalbers commented 3 years ago

This allows Manada to generate Sersic sources similar to those in the COSMOS catalog. It is intended to help diagnose potential problems in the inference stage, and perhaps facilitate comparisons to earlier papers.

In more detail, this:

Here are some example images to compare the different smoothing procedures. The first column is the full original image, all other columns are 64x64 images from manada (config_d_los_sigma_sub), produced with a zero-arcsec theta_E lens, no random rotation, and a fixed seed for noise generation. The second column uses smoothing_sigma = 0, the third the default (smoothing_sigma = 0.08, and the final column uses COSMOSSersicCatalog as the source class (for which smoothing_sigma has no effect).

smoothing_comparison

(@swagnercarena I see the PR picked up your unmerged commits from parameter_changes -- let me know if you'd rather merge those separately, or if you'd like me to rebase this PR on master)

swagnercarena commented 3 years ago

This all looks great! I pulled the changes from parameter_changes into master, so that should no longer be an issue. I just added two tests for the individual functions (a little picky on my end but I like to have each function have its own test when possible). I also added a bit more documentation. Feel free to merge with master if everything looks good to you.

JelleAalbers commented 3 years ago

Thanks Sebastian, the extra tests look good! You even added docstrings for functions that just raise NotImplementedError :-)