slsim.Deflectors.DeflectorPopulation package¶
Submodules¶
slsim.Deflectors.DeflectorPopulation.all_lens_galaxies module¶
- class slsim.Deflectors.DeflectorPopulation.all_lens_galaxies.AllLensGalaxies(red_galaxy_list, blue_galaxy_list, kwargs_cut, kwargs_mass2light, cosmo, sky_area, gamma_pl=None, catalog_type='skypy')[source]¶
Bases:
DeflectorsBaseClass describing all-type galaxies.
slsim.Deflectors.DeflectorPopulation.cluster_deflectors module¶
- class slsim.Deflectors.DeflectorPopulation.cluster_deflectors.ClusterDeflectors(cluster_list, members_list, galaxy_list, kwargs_cut, kwargs_mass2light, cosmo, sky_area, catalog_type='skypy', richness_fn='Abdullah2022', kwargs_draw_members=None)[source]¶
Bases:
DeflectorsBaseClass describing cluster lens model with a NFW profile for the dark matter halo and EPL profile for the subhalos (cluster members). It makes use of a group/cluster catalog and a group/cluster member catalog (e.g. redMaPPer).
This class is called by setting deflector_type == “cluster-catalog” in LensPop.
- static assign_similar_galaxy(members_list, galaxy_list, cosmo=None, bands=('g', 'r', 'i', 'z', 'Y'), max_gals=10000)[source]¶
Assigns a similar galaxy to each member of a group/cluster member catalog by comparing their magnitudes and redshifts.
- Parameters:
members_list (astropy.table.Table) – astropy table with columns ‘mag_{band}’, ‘z’
galaxy_list (astropy.table.Table) – astropy table with columns ‘mag_{band}’, ‘z’
cosmo (astropy.cosmology) – astropy.cosmology instance
bands (list) – list of bands to compare
max_gals (int) – maximum number of galaxies to compare to
- draw_cluster(index)[source]¶
- Parameters:
index (int) – index of cluster in catalog
- Returns:
dictionary of NFW parameters for the cluster halo
- draw_deflector(index=None)[source]¶
- Parameters:
index (int or None) – index of deflector, if not provided, draw randomly from all deflectors
- Returns:
dictionary of complete parameterization of deflector
- draw_members(cluster_id, center_scatter=0.2, max_dist=80, bcg_band='r')[source]¶
- Parameters:
cluster_id (int) – identifier of the cluster
center_scatter (float) – scatter in center of the BCG in arcsec
max_dist (float) – maximum distance from the BCG in arcsec
bcg_band: band to use to identify the BCG :type bcg_band: str :return: astropy table with EPL+Sersic parameters of each member
slsim.Deflectors.DeflectorPopulation.compound_lens_halos_galaxies module¶
- class slsim.Deflectors.DeflectorPopulation.compound_lens_halos_galaxies.CompoundLensHalosGalaxies(halo_galaxy_list, kwargs_cut, kwargs_mass2light, cosmo, sky_area)[source]¶
Bases:
DeflectorsBaseClass describing compound lens model in which the mass distribution of individual lens objects is described by a superposition of dark matter and stellar components.
This class is called by setting deflector_type == “halo-models” in LensPop.
slsim.Deflectors.DeflectorPopulation.deflectors_base module¶
- class slsim.Deflectors.DeflectorPopulation.deflectors_base.DeflectorsBase(deflector_table, kwargs_cut, cosmo, sky_area, gamma_pl=None, deflector_type='EPL_SERSIC')[source]¶
Bases:
ABCAbstract Base Class to create a class that accesses a set of deflectors.
All object that inherit from Lensed System must contain the methods it contains.
slsim.Deflectors.DeflectorPopulation.elliptical_lens_galaxies module¶
- class slsim.Deflectors.DeflectorPopulation.elliptical_lens_galaxies.EllipticalLensGalaxies(galaxy_list, kwargs_cut, kwargs_mass2light, cosmo, sky_area, gamma_pl=None, catalog_type='skypy')[source]¶
Bases:
DeflectorsBaseClass describing elliptical galaxies.
- slsim.Deflectors.DeflectorPopulation.elliptical_lens_galaxies.elliptical_projected_eccentricity(ellipticity, light2mass_e_scaling=1, light2mass_e_scatter=0.1, light2mass_angle_scatter=0.1, **kwargs)[source]¶
Projected eccentricity of elliptical galaxies as a function of other deflector parameters.
- Parameters:
ellipticity (float [0,1)) – eccentricity amplitude (1-q^2)/(1+q^2)
light2mass_e_scaling – scaling factor of mass eccentricity / light eccentricity
light2mass_e_scatter – scatter in light and mass eccentricities from the scaling relation
light2mass_angle_scatter – scatter in orientation angle between light and mass eccentricity
kwargs (dict) – deflector properties
- Returns:
e1_light, e2_light,e1_mass, e2_mass eccentricity components