slsim.Deflectors.DeflectorTypes package

Submodules

slsim.Deflectors.DeflectorTypes.deflector_base module

class slsim.Deflectors.DeflectorTypes.deflector_base.DeflectorBase(z, vel_disp=None, stellar_mass=None, angular_size=None, center_x=None, center_y=None, deflector_area=0.01, **kwargs)[source]

Bases: ABC

Class 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

abstract property halo_properties

Dictionary of properties of the deflector (mass distribution)

Returns:

dictionary of properties

property light_ellipticity

Light ellipticity.

Returns:

e1_light, e2_light

abstract 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.

Returns:

e1_mass, e2_mass

abstract 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 redshift

Deflector redshift.

Returns:

redshift

property stellar_mass
Returns:

stellar mass of deflector [M_sol]

update_center(deflector_area)[source]

Overwrites the deflector center position.

Parameters:

deflector_area – area (in solid angle arcseconds^2) to dither the center of the deflector

Returns:

velocity_dispersion(cosmo=None)[source]

Velocity dispersion of deflector.

Parameters:

cosmo – ~astropy.cosmology class

Returns:

velocity dispersion [km/s]

slsim.Deflectors.DeflectorTypes.epl_sersic module

class slsim.Deflectors.DeflectorTypes.epl_sersic.EPLSersic(**deflector_dict)[source]

Bases: EPL

Deflector with an elliptical power-law and a Sersic light model.

required quantities in dictionary: - ‘vel_disp’: SIS equivalent velocity dispersion of the deflector - ‘e1_mass’: eccentricity of EPL profile - ‘e2_mass’: eccentricity of EPL profile - ‘stellar_mass’: stellar mass in physical M_sol - ‘angular_size’: half-light radius of stellar/light profile in radian - ‘n_sersic’: Sersic index of deflector light - ‘e1_light’: eccentricity of light - ‘e2_light’: eccentricity of light - ‘z’: redshift of deflector

property light_ellipticity

Light ellipticity.

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

slsim.Deflectors.DeflectorTypes.epl module

class slsim.Deflectors.DeflectorTypes.epl.EPL(sis_convention=True, theta_E=None, gamma_pl=2, **deflector_dict)[source]

Bases: DeflectorBase

Deflector with an elliptical power-law and a Sersic light model.

required quantities in dictionary: - ‘vel_disp’: SIS equivalent velocity dispersion of the deflector - ‘gamma_pl’: power-law slope - ‘e1_mass’: eccentricity of EPL profile - ‘e2_mass’: eccentricity of EPL profile - ‘stellar_mass’: stellar mass in physical M_sol - ‘angular_size’: half-light radius of stellar/light profile in radian - ‘z’: redshift of deflector

property halo_properties

Mass density logarithmic slope.

Returns:

gamma (with =2 is isothermal)

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

mass_model_lenstronomy(lens_cosmo=None, spherical=False)[source]

Returns lens model instance and parameters in lenstronomy conventions.

Parameters:
  • lens_cosmo (LensCosmo instance) – lens cosmology model

  • spherical (bool) – if True, makes spherical assumption

Returns:

lens_mass_model_list, kwargs_lens_mass

velocity_dispersion(cosmo=None)[source]

Velocity dispersion of deflector. If velocity dispersion is not provided in the deflector dict, None will be returned. Then, _einstein_radius() function expects value of einstein radius in the deflector dict which will be used in mass_model_lenstronomy() function.

Parameters:

cosmo (cosmology class) – cosmology. This parameter is not used in this function. We use it as a dummy input for consistency with other deflector types. default is None.

Returns:

velocity dispersion [km/s]

slsim.Deflectors.DeflectorTypes.nfw_cluster module

class slsim.Deflectors.DeflectorTypes.nfw_cluster.NFWCluster(subhalos, **deflector_dict)[source]

Bases: DeflectorBase

Class of a NFW halo lens model with subhalos. Each subhalo is a EPLSersic instance with its own mass and light.

required quantities in dictionary: - ‘halo_mass’: halo mass in physical M_sol - ‘concentration’: halo concentration - ‘e1_mass’: eccentricity of NFW profile - ‘e2_mass’: eccentricity of NFW profile - ‘z’: redshift of deflector - ‘subhalos’: list of dictionary with EPLSersic parameters

property halo_properties

Properties of the NFW halo.

Returns:

halo mass M200 [physical M_sol], concentration r200/rs

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:

total magnitude of deflector in given band

mass_model_lenstronomy(lens_cosmo, spherical=False)[source]

Returns lens model instance and parameters in lenstronomy conventions.

Parameters:
  • lens_cosmo (LensCosmo instance) – lens cosmology model

  • spherical (bool) – if True, makes spherical assumption

Returns:

lens_mass_model_list, kwargs_lens_mass

property stellar_mass
Returns:

total stellar mass of deflector [M_sol]

velocity_dispersion(cosmo=None)[source]

Velocity dispersion of deflector. Simplified assumptions on anisotropy and averaged over the characteristic radius.

Parameters:

cosmo (cosmology class) – cosmology

Returns:

velocity dispersion [km/s]

slsim.Deflectors.DeflectorTypes.nfw_hernquist module

class slsim.Deflectors.DeflectorTypes.nfw_hernquist.NFWHernquist(z, vel_disp=None, stellar_mass=None, angular_size=None, center_x=None, center_y=None, deflector_area=0.01, **kwargs)[source]

Bases: DeflectorBase

Class of a NFW+Hernquist lens model with a Hernquist light mode.

required quantities in dictionary: - ‘halo_mass’: halo mass in physical M_sol - ‘concentration’: halo concentration - ‘e1_mass’: eccentricity of NFW profile - ‘e2_mass’: eccentricity of NFW profile - ‘stellar_mass’: stellar mass in physical M_sol - ‘angular_size’: half-light radius of stellar/light profile in radian - ‘e1_light’: eccentricity of light - ‘e2_light’: eccentricity of light - ‘z’: redshift of deflector

property halo_properties

Properties of the NFW halo.

Returns:

halo mass M200 [physical M_sol], concentration r200/rs

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

mass_model_lenstronomy(lens_cosmo, spherical=False)[source]

Returns lens model instance and parameters in lenstronomy conventions.

Parameters:
  • lens_cosmo (LensCosmo instance) – lens cosmology model

  • spherical (bool) – if True, makes spherical assumption

Returns:

lens_mass_model_list, kwargs_lens_mass

velocity_dispersion(cosmo=None)[source]

Velocity dispersion of deflector. Simplified assumptions on anisotropy and averaged over the half-light radius.

Parameters:

cosmo (cosmology class) – cosmology

Returns:

velocity dispersion [km/s]

Module contents