gravelamps.models.phenomenological_millilensing

Functions handling the phenomneological millilensing model reliant only on lensing observables.

gravelamps.models.phenomenological_millilensing.amplification(frequencies: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], num_images: int, magnifications: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], time_delays: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], morse_idxs: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]) Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]

Computes the amplification factor for the given parameters.

The total amplification of the millilensing signal consists of the total of the contributions from each contributing millisignal. The number of millisignals must be given, and the lensing observable arrays must be filled appropriately.

Parameters:
frequencies: ArrayLike

Physical frequencies.

num_images: int

Number of millisignals (including primary).

magnifications: ArrayLike

Relative magnifications of the millisignals.

time_delays: ArrayLike

Time delays between millisignals relative to the first image.

morse_idxs: ArrayLike

Morse indices of each millisignal.

Returns:
amp: ArrayLike
gravelamps.models.phenomenological_millilensing.create_parameter_lists(num_images: int, parameters: dict) tuple[list[float]]

Gathers lens parameters into lists.

Gathers the disparate image times, effective luminosity distances, and Morse indices of the individual signals from the parameter dictionary into ordered lists. These are assumed to be in time order, with the number indicating order.

Parameters in the dictionary should be written as mu_relx, dtx and nx for the relative magnifications, time delays, and Morse indices respectively, replacing x with time-ordering relative to the primary signal noted as 0. The primary signal should have an n0 parameter but should not have either a dt0 or a mu_rel0 parameter.

Parameters:
num_images: int

Number of millisignals (including primary).

parameters: dict

Contains values of lens parameters to be extracted.

Returns:
magnifications: list[float]

Relative magnifications of the millisignals.

times: list[float]

Time delay values relative to primary signal. The initial entry in this list will always be zero, i.e. the primary.

indices: list[float]

Morse indicies of the millisignals.

gravelamps.models.phenomenological_millilensing.get_parameter_strings(num_images: int) list[str]

Generates the strings of the required parameters based on the number of millisignals.

Parameters:
num_images: int

Number of millisignals (including primary).

Returns:
parameter_strings: list[str]

List containing parameter names to be added to bilby waveform.

Raises:
ValueError

If input argument is less than 1 (i.e. zero or negative).

gravelamps.models.phenomenological_millilensing.lens_parameter_keys(settings: dict) list[str]

Gets the lens parameter keys from a settings dictionary.

Parameters:
settings: dict

Settings dictionary. Must contain “max_num_images” option with an integer value.

Returns:
parameter_strings: list[str]

List containing parameter names to be added to bilby waveform.

Raises:
KeyError

If “max_num_images” option not in the settings dictionary.