redback.utils
Functions
Function to compute the error associated with the flux measurement of the transient source, computed based on the observation databse determined five-sigma depth. |
|
|
Convert flux to magnitude |
|
Convert magnitude to flux |
|
Converts a list of bands into an array of frequency in Hz |
|
Looks up the reference flux for a given band from the filters table. |
|
Bands to zero point |
|
Bin TimeTaggedEvents into bins of size bin_size |
|
Calculate AB magnitude from flux density assuming monochromatic AB filter |
|
Calculate credible intervals from samples |
Calculate flux density error from magnitude error |
|
|
Calculate flux density from AB magnitude assuming monochromatic AB filter |
|
Calculate flux density from Vega magnitude assuming Vega filter |
|
Calculate flux error from magnitude error |
|
Perform k-correction |
Calculate the median and error bar of a one dimensional array of samples |
|
|
Calculate the fall back timescale for a SMBH disrupting a stellar mass object :param binding_energy_const: :param mbh_6: SMBH mass in solar masses :param stellar_mass: stellar mass in solar masses :return: fall back time in seconds |
|
Calculate Vega magnitude from flux density assuming Vega filter |
|
Calculate the normalisation for smoothly joining two models together at a reference time. |
|
Cumulative distribution function |
|
checks that an element exists on a website, and provides an exception |
|
|
Wrapper for citation function to allow functions to have a citation attribute :param r: proxy argument :return: wrapped function |
|
|
Convert absolute magnitude to apparent |
|
Convert date to JD |
|
Convert date to MJD |
|
Calculate the deceleration timescale for an afterglow |
Download the pointing tables from zenodo. |
|
|
Uses interpolation from Tanaka+19 to calculate the electron fraction based on the temperature independent gray opacity :param kappa: temperature independent gray opacity :return: electron_fraction |
|
Find the nearest value in an array to a given value. |
|
Find the path of some data in the package |
|
Converts a list of frequencies into an array corresponding band names |
|
Calculate CSM properties for CSM interacting models |
|
|
|
|
|
Uses Barnes+2016 and interpolation to calculate the r-process thermalisation efficiency depending on the input mass and velocity :param mej: ejecta mass in solar masses :param vej: initial ejecta velocity as a fraction of speed of light :return: av, bv, dv constants in the thermalisation efficiency equation Eq 25 in Metzger 2017 |
|
Convert JD to date |
|
Convert JD to MJD |
Uses interpolation from Tanaka+19 to calculate the opacity based on the electron fraction :param ye: electron fraction :return: electron_fraction |
|
|
Kernel Density Estimation with Scipy |
|
|
|
Calculates the Lorentz factor for a given velocity :param velocity: velocity in cm/s :return: Lorentz factor |
|
Function to propagate the flux error to the mag system. |
|
Convert MJD to date |
|
Convert MJD to JD |
|
|
|
Setup logging output: call at the start of the script to use |
|
Convert redback data band names to sncosmo compatible band names |
|
Calculates the velocity for a given Lorentz factor :param Lorentz_factor: relativistic Lorentz factor :return: velocity in cm/s |
Classes
|
Descriptor class to access boolean data_mode switches. |
|
Descriptor class to access a kwarg dictionary with defaults. |
|
Generic descriptor class that allows handy access of properties without long boilerplate code. |
|
Cosmology class similar to the Astropy cosmology class. |