gravelamps.lensing.sis

Singular Isothermal Sphere (SIS) Lensing Functions

Following are functions performing calculations for the singular isothermal sphere lens mass density profile model. The module backend is based in libsis.

Written by Mick Wright 2022

Globals

_cdllctypes.CDLL

Library of C++ functions necessary for calculations

_additional_argumentslist of str

Additional arguments required to construct interpolator data

_additional_argument_typeslist of types

Types of the argumnets that are given above

_lens_parameterslist of str

Parameters used for the model

Routines

redshifted_lens_mass

Calculates redshifted lens mass required for given time delay and dimensionless time delay to correlate

dimensionless_time_delay

Computes the dimensionless time delay corresponding to a given source position

magnification

Computes the magnification of the specified image at the given source position

single_image_amplification

Computes the geometric optics amplification factor for only the specified image

amplification_factor

Calculates geometric optics amplification factor

generate_interpolator_data

Generates the amplification factor data files for use in interpolator generation

Functions

redshifted_lens_mass(time_delay_value, ...)

Calculates redshifted lens mass required for given time delay and dimensionless time delay to

magnification(source_position, image)

Computes the magnification of the specified image at the source position given.

relative_magnification(source_position)

Computes the relative magnification of two images at the given source position.

dimensionless_time_delay(source_position)

Computes the dimensionless time delay that corresponds to the source position.

single_image_amplification(...)

Calculates the geomtric optics amplification factor for only the specified image.

amplification_factor(dimensionless_frequency_array, ...)

Calculates geometric optics amplification factor.

generate_interpolator_data(config, args, file_dict)

Generates the amplification factor data files for use in interpolator generation.

Module Contents

gravelamps.lensing.sis.redshifted_lens_mass(time_delay_value, dimensionless_time_delay_value)

Calculates redshifted lens mass required for given time delay and dimensionless time delay to correlate.

This is a rearranging of the relationship betweeen the time delay and the dimensionless equivalent, which for the isolated singular isothermal sphere model is given by td = 4 * Mlz * dim_td.

Parameters:
time_delay_valuefloat

Physical time delay between two signals in seconds

dimensionless_time_delay_valuefloat

Corresponding dimensionless time delay between the two signals

Returns:
massfloat

Physical mass that connects the physical and dimensionless time delays

gravelamps.lensing.sis.magnification(source_position, image)

Computes the magnification of the specified image at the source position given.

This is a wrapper function to the C++ function PyMagnification within libsis.

Parameters:
source_positionfloat

Dimensionless displacement from the optical axis

imageint

Which image to compute. 1 corresponds to the + image and 0 corresponds to the - image.

Returns:
float

Magnification corresponding to the specified input parameters

gravelamps.lensing.sis.relative_magnification(source_position)

Computes the relative magnification of two images at the given source position.

This function computes the two magnifications associated with singular isothermal sphere lensing and returns the ratio (+/-) between them.

Parameters:
source_positionfloat

Dimensionless displacement from the optical axis

Returns:
mu_relfloat

Ratio between the magnifications of the + and - image respectively.

gravelamps.lensing.sis.dimensionless_time_delay(source_position)

Computes the dimensionless time delay that corresponds to the source position.

This is a wrapper function to the C++ function PyTimeDelay within libsis for the given source position.

Parameters:
source_positionfloat

Dimensionless displacement from the optical axis

Returns:
delayfloat

Dimensionless time delay produced by the lensing of the signals with given source position

gravelamps.lensing.sis.single_image_amplification(dimensionless_frequency_array, source_position, image)

Calculates the geomtric optics amplification factor for only the specified image.

This calculation is done using the C++ function PySingleImageAmplification within libsis for the given dimensionless frequencies and source position, for the specified image.

Parameters:
dimensionless_frequency_arrayArrayLike

Dimensionless form of the frequencies of interest

source_positionfloat

Dimensionelss displacement from the optical axis

imageint

Which image to compute, 1 corresponds to the + image and 0 corresponds to the - image

Returns:
amplification_arrayArrayLike

Amplification of the image signal for the frequeny range at the specified source position

gravelamps.lensing.sis.amplification_factor(dimensionless_frequency_array, source_position)

Calculates geometric optics amplification factor.

This calculation is done using C++ function PyAmplificationFactorGeometric within libsis for the given dimensionless frequency and source position.

Parameters:
dimensionless_frequency_arrayArray of floats

Dimensionless form of the frequencies of interest

source_positionfloat

Dimensionless displacement from the optical axis

Returns:
amplification_arrayArray of complex

Amplification factor to the signal

gravelamps.lensing.sis.generate_interpolator_data(config, args, file_dict)

Generates the amplification factor data files for use in interpolator generation.

This is done via the C++ GenerateLensData function within libsis. It will read in the specified grid files and fill the data files with the appropriate values of the amplification factor. This can be done in wave and geometric optics.

Parameters:
configconfigparser.ConfigParser

Object containing settings from user INI file

argsargparse.Namespace

Object containing commandline arguments to program

file_dictdict

Contains paths to the interpolator grid and data files to fill