LSST-strong-lensing / slsim

Strong lensing simulation pipeline
MIT License
17 stars 30 forks source link

LensPop finds very low number of source galaxies #257

Open Nikki1510 opened 6 days ago

Nikki1510 commented 6 days ago

When I simulate deflector and source galaxies, I get only a very low number of source galaxies:

Relevant code:

source_sky_area = Quantity(value=4, unit="deg2") deflector_sky_area = Quantity(value=1, unit="deg2")

lens_galaxies = deflectors.AllLensGalaxies( red_galaxy_list=galaxy_simulation_pipeline.red_galaxies, blue_galaxy_list=galaxy_simulation_pipeline.blue_galaxies, kwargs_cut=kwargs_deflector_cut, kwargs_mass2light={}, cosmo=cosmo, sky_area=deflector_sky_area, )

source_galaxies = sources.PointPlusExtendedSources( point_plus_extended_sources_list=supernovae_data, cosmo=cosmo, sky_area=source_sky_area, kwargs_cut=kwargs_source_cut, variability_model="light_curve", kwargs_variability_model={"MJD", "ps_mag_r"}, list_type="list", )

supernova_lens_pop = LensPop( deflector_population=lens_galaxies, source_population=source_galaxies, cosmo=cosmo, )

Output:

Found 151704 potential deflector galaxies and 1 potential source galaxies.

Full notebook: https://github.com/Nikki1510/slsim/blob/opsim/notebooks/Opsim_supernovae_plus_extended_source_tutorial.ipynb

nkhadka21 commented 6 days ago

Hi @Nikki1510 , thank you very much for asking this. You are getting 1 potential source galaxies because you did not provide sky_area to LensPop. If you provide sky_area, then you should get 48 sources with your redshift criteria. Note: "/Sources/SupernovaeCatalog/supernovae_data.pkl" contains sample of only 100 supernovae. So, I suggest to use larger sample with specified sky_area. Thank you!