gravelamps.core.conversion

Gravelamps Conversion Functions

Following are functions handling physical unit conversions

Written by Mick Wright 2022

Routines

lens_mass_to_redshifted_lens_mass

Converts from source frame lens mass to observer frame redshfited lens msas

solar_mass_to_natural_mass

Converts mass from units of solar mass to natural units such that c=G=1

frequency_to_dimensionless_frequency

Converts regular frequencies in Hz to dimensionless frequencies

Functions

lens_mass_to_redshifted_lens_mass(lens_mass, ...)

Converts from source frame lens mass to observer frame redshifted lens mass

solar_mass_to_natural_mass(solar_mass)

Converts mass from units of solar mass to natural units such that c=G=1.

natural_mass_to_solar_mass(natural_mass)

Input:

frequency_to_dimensionless_frequency(frequency_array)

Converts regular frequencies in Hz to dimensionless frequencies.

Module Contents

gravelamps.core.conversion.lens_mass_to_redshifted_lens_mass(lens_mass, lens_fractional_distance, luminosity_distance)

Converts from source frame lens mass to observer frame redshifted lens mass

Parameters:
lens_massfloat

Source frame mass of lensing object in Solar Masses

lens_fractional_distancefloat

Distance to lensing object as a fraction of the luminosity distance to the source

luminosity_distancefloat

Distance to the source object in Mpc

Returns:
redshifted_lens_massfloat

Observer frame mass of lensing object in natural units

gravelamps.core.conversion.solar_mass_to_natural_mass(solar_mass)

Converts mass from units of solar mass to natural units such that c=G=1.

Parameters:
solar_massfloat

Mass in solar mass units

Returns:
natural_massfloat

The same mass in natural units

gravelamps.core.conversion.natural_mass_to_solar_mass(natural_mass)
Input:

natural_mass - Mass in natural units

Output:

solar_mass - Mass in units of solar mass

Converts a mass from natural units to solar masses.

gravelamps.core.conversion.frequency_to_dimensionless_frequency(frequency_array, redshifted_lens_mass=None)

Converts regular frequencies in Hz to dimensionless frequencies.

Can be done in two methods. If the redshifted lens mass is supplied this will be done for that specific mass object. If it is not supplied, it will be done using a generic agnostic form

Parameters:
frequency_arrayArrayLike

Array of frequencies to convert

redshifted_lens_massfloat, optional

Mass of lensing object to use in conversion

Returns:
dimensionless_frequency_arrayArrayLike

Array of converted dimensionless frequencies