LSST-strong-lensing / slsim

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

Refactoring SLSim - Create Sampler class #229

Open jacob-hjortlund opened 1 month ago

jacob-hjortlund commented 1 month ago

Current Status

LensPop uniformly samples from the deflector and source populations, constructs a Lens instance and checks if it is a valid strong lensing system. This leads to relatively low efficiency in creating strong lensing systems, which can hamper some use cases.

Proposed Solution

Extend LensPop to take a string / callable as input following the Sampler interface shown in #223 . The Sampler interface should take a Catalog from a Population instance and override the sample method of the Population. An example subclass, and expected default behaviour would be a UniformSampler that reproduces the behaviour of the Population sample method, see #225 . A useful subclass would a OpticalDepthSampler follows the approach in A. Sainz de Murieta et al. 2024, and takes a source redshift and the lens catalog, and samples deflector galaxies weighted by their optical depth, increasing the chances of a given deflector / source combination creating a valid Lens (see #228 ).

To-Do List

luisleonanaya commented 2 weeks ago

Hi @jacob-hjortlund

@alxogm suggested me to work in this issue, I am currently on this.