slsim.Deflectors package¶
Subpackages¶
- slsim.Deflectors.DeflectorPopulation package
- Submodules
- slsim.Deflectors.DeflectorPopulation.all_lens_galaxies module
- slsim.Deflectors.DeflectorPopulation.cluster_deflectors module
- slsim.Deflectors.DeflectorPopulation.compound_lens_halos_galaxies module
- slsim.Deflectors.DeflectorPopulation.deflectors_base module
- slsim.Deflectors.DeflectorPopulation.elliptical_lens_galaxies module
- Module contents
- slsim.Deflectors.DeflectorTypes package
- Submodules
- slsim.Deflectors.DeflectorTypes.deflector_base module
DeflectorBaseDeflectorBase.angular_size_lightDeflectorBase.deflector_centerDeflectorBase.halo_propertiesDeflectorBase.light_ellipticityDeflectorBase.light_model_lenstronomy()DeflectorBase.magnitude()DeflectorBase.mass_ellipticityDeflectorBase.mass_model_lenstronomy()DeflectorBase.redshiftDeflectorBase.stellar_massDeflectorBase.update_center()DeflectorBase.velocity_dispersion()
- slsim.Deflectors.DeflectorTypes.epl_sersic module
- slsim.Deflectors.DeflectorTypes.epl module
- slsim.Deflectors.DeflectorTypes.nfw_cluster module
- slsim.Deflectors.DeflectorTypes.nfw_hernquist module
- Module contents
- slsim.Deflectors.MassLightConnection package
- Submodules
- slsim.Deflectors.MassLightConnection.galaxy_population module
- slsim.Deflectors.MassLightConnection.light2mass module
- slsim.Deflectors.MassLightConnection.massive_deflectors_DP0p2 module
- slsim.Deflectors.MassLightConnection.richness2mass module
- slsim.Deflectors.MassLightConnection.velocity_dispersion module
redshifts_from_comoving_density()schechter_vel_disp()schechter_vel_disp_redshift()schechter_velocity_dispersion_function()theta_E_from_vel_disp_epl()vel_disp_abundance_matching()vel_disp_composite_model()vel_disp_nfw()vel_disp_nfw_3d()vel_disp_nfw_aperture()vel_disp_power_law()vel_disp_sdss()
- Module contents
Submodules¶
slsim.Deflectors.deflector module¶
- class slsim.Deflectors.deflector.Deflector(deflector_type, **kwargs)[source]¶
Bases:
objectClass of a single deflector with quantities only related to the deflector (independent of the source)
- property angular_size_light¶
Angular size of the light component.
- Returns:
angular size [arcsec]
- property deflector_center¶
Center of the deflector position.
- Returns:
[x_pox, y_pos] in arc seconds
- property halo_properties¶
Properties of the NFW halo.
- Returns:
halo mass M200 [physical M_sol], concentration r200/rs
- property light_ellipticity¶
Light ellipticity. Defined as:
\[e1 = \frac{1-q}{1+q} * cos(2 \phi) e2 = \frac{1-q}{1+q} * sin(2 \phi)\]with q being the minor-to-major axis ratio.
- Returns:
e1_light, e2_light
- light_model_lenstronomy(band=None)[source]¶
Returns lens model instance and parameters in lenstronomy conventions.
- Parameters:
band (str) – imaging band
- Returns:
lens_light_model_list, kwargs_lens_light
- magnitude(band)[source]¶
Apparent magnitude of the deflector for a given band.
- Parameters:
band (string) – imaging band
- Returns:
magnitude of deflector in given band
- property mass_ellipticity¶
Mass ellipticity Defined as:
\[e1 = \frac{1-q}{1+q} * cos(2 \phi) e2 = \frac{1-q}{1+q} * sin(2 \phi)\]with q being the minor-to-major axis ratio.
- Returns:
e1_mass, e2_mass
- mass_model_lenstronomy(lens_cosmo)[source]¶
Returns lens model instance and parameters in lenstronomy conventions.
- Parameters:
lens_cosmo (LensCosmo instance) – lens cosmology model
- Returns:
lens_mass_model_list, kwargs_lens_mass
- property name¶
Meaningful name string of the deflector.
- Returns:
name string
- property redshift¶
Deflector redshift.
- Returns:
redshift
- property stellar_mass¶
- Returns:
stellar mass of deflector [M_sol]
- surface_brightness(ra, dec, band=None)[source]¶
Surface brightness at position ra/dec.
- Parameters:
ra – position RA
dec – position DEC
band (str) – imaging band
- Returns:
surface brightness at postion ra/dec [mag / arcsec^2]
- theta_e_infinity(cosmo)[source]¶
Einstein radius for a source at infinity (or well passed where galaxies exist.
- Parameters:
cosmo – astropy.cosmology instance
- Returns:
Module contents¶
- class slsim.Deflectors.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.
- class slsim.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
- class slsim.Deflectors.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.
- class slsim.Deflectors.Deflector(deflector_type, **kwargs)[source]¶
Bases:
objectClass of a single deflector with quantities only related to the deflector (independent of the source)
- property angular_size_light¶
Angular size of the light component.
- Returns:
angular size [arcsec]
- property deflector_center¶
Center of the deflector position.
- Returns:
[x_pox, y_pos] in arc seconds
- property halo_properties¶
Properties of the NFW halo.
- Returns:
halo mass M200 [physical M_sol], concentration r200/rs
- property light_ellipticity¶
Light ellipticity. Defined as:
\[e1 = \frac{1-q}{1+q} * cos(2 \phi) e2 = \frac{1-q}{1+q} * sin(2 \phi)\]with q being the minor-to-major axis ratio.
- Returns:
e1_light, e2_light
- light_model_lenstronomy(band=None)[source]¶
Returns lens model instance and parameters in lenstronomy conventions.
- Parameters:
band (str) – imaging band
- Returns:
lens_light_model_list, kwargs_lens_light
- magnitude(band)[source]¶
Apparent magnitude of the deflector for a given band.
- Parameters:
band (string) – imaging band
- Returns:
magnitude of deflector in given band
- property mass_ellipticity¶
Mass ellipticity Defined as:
\[e1 = \frac{1-q}{1+q} * cos(2 \phi) e2 = \frac{1-q}{1+q} * sin(2 \phi)\]with q being the minor-to-major axis ratio.
- Returns:
e1_mass, e2_mass
- mass_model_lenstronomy(lens_cosmo)[source]¶
Returns lens model instance and parameters in lenstronomy conventions.
- Parameters:
lens_cosmo (LensCosmo instance) – lens cosmology model
- Returns:
lens_mass_model_list, kwargs_lens_mass
- property name¶
Meaningful name string of the deflector.
- Returns:
name string
- property redshift¶
Deflector redshift.
- Returns:
redshift
- property stellar_mass¶
- Returns:
stellar mass of deflector [M_sol]
- surface_brightness(ra, dec, band=None)[source]¶
Surface brightness at position ra/dec.
- Parameters:
ra – position RA
dec – position DEC
band (str) – imaging band
- Returns:
surface brightness at postion ra/dec [mag / arcsec^2]
- theta_e_infinity(cosmo)[source]¶
Einstein radius for a source at infinity (or well passed where galaxies exist.
- Parameters:
cosmo – astropy.cosmology instance
- Returns:
- class slsim.Deflectors.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.
- class slsim.Deflectors.EllipticalLensGalaxies(galaxy_list, kwargs_cut, kwargs_mass2light, cosmo, sky_area, gamma_pl=None, catalog_type='skypy')[source]¶
Bases:
DeflectorsBaseClass describing elliptical galaxies.