gravelamps.lensing.interpolator

Model Interpolator Lensing Functions

Following are functions that perform calculations using a lensing interpolator generated from user specified files. Included are the necessary functions to run the generators for such files for a given model assuming it is similar in form to those used within Gravelamps directly.

Written by Mick Wright 2022

Globals

_complex_interpolator

Store of the generated complex interpolator

_lens_parameters

Parameters to be passed to data generation functions

Routines

amplification_factor

Calculates amplification factor value for given grid values

generate_interpolator

Generates interpolator from the specified files

Functions

amplification_factor(dimensionless_frequency_array, ...)

Calculates amplification factor value for given grid values using the generated interpolator.

generate_interpolator(dimensionless_frequency_file, ...)

Generates the amplification factor interpolator from the specified files.

Module Contents

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

Calculates amplification factor value for given grid values using the generated interpolator.

Parameters:
dimensionless_frequency_arrayfloat or Array of floats

Dimensionless form of the frequency of gravitational wave data

source_positionfloat

Dimensionless displacement from the optical axis

Returns:
amplification_arrayfloat or Array or floats

Interpolated values of the amplification factor for the specified grid values

Raises:
AttributeError

In case where the amplification factor is called before the interpolator is generated

gravelamps.lensing.interpolator.generate_interpolator(dimensionless_frequency_file, source_position_file, amplification_factor_real_file, amplification_factor_imag_file)

Generates the amplification factor interpolator from the specified files.

Specifically 1d interpolators are constructed for the real and imaginary components and these are combined into a single complex interpolator from the files specified. The result is placed into the _complex_interpolator global

Parameters:
dimensionless_frequency_filestr

Path to file containing dimensionless frequency values to form grid axis

source_position_filestr

Path to file containing source position values to form grid axis

amplification_factor_real_filestr

Path to file containing real amplification factor data to form the interpolator

amplification_factor_imag_filestr

Path to file containing imaginary amplification factor data to form the interpolator