gravelamps.lensing.point

Isolated Point Mass Lensing Functions

Following are functions performing calculations for an isolated point lens mass density profile model. The module backed is based in libpoint.

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 arguments that are given above

_lens_parameterslist of str

Parameters used for the model

Routines

time_delay_to_redshifted_lens_mass

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

calculate_dimensionless_time_delay

Computes the dimensionless time delay corresponding to a given source 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

dimensionless_time_delay(source_position)

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

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.

single_image_amplification(...)

Calculates the geometric 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.point.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 between the time delay and the dimensionless equivalent, which for the isolated point mass 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.point.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 libpoint for the given source position.

Parameters:
source_positionfloat

Dimensionless displacement from the optical axis

Returns:
float

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

gravelamps.lensing.point.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 libpoint.

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.point.relative_magnification(source_position)

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

This function computes the two magnifications associated with point mass 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.point.single_image_amplification(dimensionless_frequency_array, source_position, image)

Calculates the geometric optics amplification factor for only the specified image

This calculation is done using the C++ function PySingleImageAmplification within libpoint 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

Dimensionless 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 frequency range at the specified source position

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

Calculates geometric optics amplification factor.

This calculation is done using C++ function PyAmplificationFactorGeometric within libpoint for the given dimensionless frequencies 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.point.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 libpoint. 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