ler.lens_galaxy_population.lens_functions

Lens functions for gravitational lensing calculations.

This module provides utility functions for computing lens galaxy velocity dispersion functions, ellipticity conversions, and strong lensing cross-sections. These functions support the lens galaxy population modeling in the ler package.

The velocity dispersion functions follow the models from Oguri et al. (2018b) and Bernardi et al. (2010). Cross-section calculations use lenstronomy for EPL+Shear lens models.

Module Contents

Functions

phi_cut_SIE(q)

Calculate cross-section scaling factor for SIE lens galaxy from SIS.

phi_q2_ellipticity(phi, q)

Convert position angle and axis ratio to ellipticity components.

cross_section(theta_E, e1, e2, gamma, gamma1, gamma2)

Compute the strong lensing cross-section for an EPL+Shear lens.

ler.lens_galaxy_population.lens_functions.phi_cut_SIE(q)[source]

Calculate cross-section scaling factor for SIE lens galaxy from SIS.

Computes the ratio of the SIE (Singular Isothermal Ellipsoid) cross-section to the SIS (Singular Isothermal Sphere) cross-section for a given axis ratio.

Parameters:
qnumpy.ndarray

Axis ratio of the lens galaxy (0 < q <= 1).

Returns:
resultnumpy.ndarray

Scaling factor (normalized to pi).

For q -> 1 (spherical): returns 1.0

For q -> 0 (highly elliptical): returns ~0.

ler.lens_galaxy_population.lens_functions.phi_q2_ellipticity(phi, q)[source]

Convert position angle and axis ratio to ellipticity components.

Parameters:
phinumpy.ndarray

Position angle of the major axis (radians).

qnumpy.ndarray

Axis ratio (0 < q <= 1).

Returns:
e1numpy.ndarray

First ellipticity component.

e2numpy.ndarray

Second ellipticity component.

ler.lens_galaxy_population.lens_functions.cross_section(theta_E, e1, e2, gamma, gamma1, gamma2)[source]

Compute the strong lensing cross-section for an EPL+Shear lens.

Uses lenstronomy to compute the caustic structure and returns the area enclosed by the double-image (outer) caustic.

Parameters:
theta_Efloat

Einstein radius (radian).

e1float

First ellipticity component.

e2float

Second ellipticity component.

gammafloat

Power-law density profile slope.

gamma1float

First external shear component.

gamma2float

Second external shear component.

Returns:
areafloat

Cross-section area (radian^2).

Returns 0.0 if caustic computation fails.