gravelamps.core.conversion ========================== .. py:module:: gravelamps.core.conversion .. autoapi-nested-parse:: 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 .. !! processed by numpydoc !! Functions --------- .. autoapisummary:: gravelamps.core.conversion.lens_mass_to_redshifted_lens_mass gravelamps.core.conversion.solar_mass_to_natural_mass gravelamps.core.conversion.natural_mass_to_solar_mass gravelamps.core.conversion.frequency_to_dimensionless_frequency Module Contents --------------- .. py:function:: 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_mass** : float Source frame mass of lensing object in Solar Masses **lens_fractional_distance** : float Distance to lensing object as a fraction of the luminosity distance to the source **luminosity_distance** : float Distance to the source object in Mpc :Returns: **redshifted_lens_mass** : float Observer frame mass of lensing object in natural units .. !! processed by numpydoc !! .. py:function:: solar_mass_to_natural_mass(solar_mass) Converts mass from units of solar mass to natural units such that c=G=1. :Parameters: **solar_mass** : float Mass in solar mass units :Returns: **natural_mass** : float The same mass in natural units .. !! processed by numpydoc !! .. py:function:: 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. .. !! processed by numpydoc !! .. py:function:: 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_array** : ArrayLike Array of frequencies to convert **redshifted_lens_mass** : float, optional Mass of lensing object to use in conversion :Returns: **dimensionless_frequency_array** : ArrayLike Array of converted dimensionless frequencies .. !! processed by numpydoc !!