slsim.FalsePositives package¶
Submodules¶
slsim.FalsePositives.false_positive_pop module¶
- class slsim.FalsePositives.false_positive_pop.FalsePositivePop(central_galaxy_population, intruder_populations, intruder_number_choices=[1, 2, 3], weights_for_intruder_number=None, cosmo=None, los_pop=None, test_area_factor=1, clustering_mode='area', include_central_galaxy_light=True)[source]¶
Bases:
FalsePositivePopBaseClass to perform samples of false positive population.
This class generates configurations consisting of a central deflector and one or multiple sources drawn from provided populations (e.g., surrounding galaxies, stars, quasars). It combines the functionality of single-source and multi-source generation with flexible clustering modes.
Note that these sources are not lensed by the deflector, but are positioned in a way that they could be misidentified as lensed images of a source due to the deflector, thus creating a “false positive” lensing configuration.
- draw_false_positive(number=1)[source]¶
Draw given number of false positive systems.
- Parameters:
number – number of false positive requested. The default value is 1.
- Returns:
list of FalsePositive() instance (or single instance if number=1).
- draw_sources(z_max=None, test_area=None, theta_e=None)[source]¶
Draws sources from all populations based on choices and positions them.
- Parameters:
z_max – maximum redshift for drawn source.
test_area – area to draw source coordinates for ‘area’ clustering mode.
theta_e – Einstein radius of the deflector, needed for ‘ring’/’random’ modes.
- Returns:
A Source instance or a list of Source instances.
- class slsim.FalsePositives.false_positive_pop.FalsePositivePopBase(central_galaxy_population, cosmo=None, los_pop=None)[source]¶
Bases:
objectBase class for false positive population generation.
This class provides common functionality and can be extended to create specific types of false positive populations.
slsim.FalsePositives.false_positive module¶
- class slsim.FalsePositives.false_positive.FalsePositive(source_class, deflector_class, cosmo, los_class=None, include_deflector_light=True, field_galaxies=None)[source]¶
Bases:
LensClass to manage individual false positive.
Here, false positives refer to a configuration that includes an elliptical galaxy at the center with blue galaxies surrounding the central elliptical galaxy.
- lenstronomy_kwargs(band=None, time=None, **kwargs)[source]¶
Generates lenstronomy dictionary conventions for the class object.
- Parameters:
band (string or None) – imaging band, if =None, will result in un- normalized amplitudes
time (float or None) – observation time (optional, used for time-variable sources like quasars; ignored for non-variable sources)