Closed JelleAalbers closed 3 years ago
After taking out the spurious luminosity-distance scaling, this now produces arguments that cause lenstronomy to return the original image, in the same units/scale, in a setup with no lensing and the same pixel size. I added a notebook test_sources.ipynb
as an example.
Note in particular that you have to call light_model.delete_interpol_caches()
every time a new image is set. Much of my confusion was because I did not do this, and it seemed no change to the image had any effect at all...
After taking out the spurious luminosity-distance scaling, this now produces arguments that cause lenstronomy to return the original image, in the same units/scale, in a setup with no lensing and the same pixel size. I added a notebook
test_sources.ipynb
as an example.Note in particular that you have to call
light_model.delete_interpol_caches()
every time a new image is set. Much of my confusion was because I did not do this, and it seemed no change to the image had any effect at all...
Sorry to hear that this caused confusion. Are you sure that if you are using the 'scale' argument within the kwargs_source to scale the image, you can not use the same interpolation multiple times at different scales, orientation and locations?
@JelleAalbers and @swagnercarena both think the merge looks good. Deleting the branch
This adds:
GalaxyCatalog
: can generate random dictionaries of arguments forlenstronomy.LightModel.Profiles.interpolation.Interpol
, describing real galaxy images shifted to a new redshift.COSMOSCatalog
: as above, using the COSMOS/GREAT3 23.5 magnitude catalog as used in galsim: https://github.com/GalSim-developers/GalSim/wiki/RealGalaxy%20Data.gitignore
and updaterequirements.txt
You can use this as follows:
A basic test for the generic
GalaxyCatalog
is included. However,kwargs
to actual lenstronomy code.