frb.dm.cosmic
Utility pieces for DM calculations
- frb.dm.cosmic.DMcosmic_PDF(Delta, C0, sigma, A=1.0, alpha=3.0, beta=3.0)[source]
PDF(Delta) following the McQuinn formalism describing the DM_cosmic PDF
See Macquart+2020 for details
- Args:
Delta (float or np.ndarray) – DM / averageDM values
C0 (float) – parameter
sigma (float)
A (float, optional)
alpha (float, optional)
beta (float, optional)
- Return type:
float or np.ndarray
- frb.dm.cosmic.deviate1(C0, sigma, beta, orig=False)[source]
Calculate deviate to solve fo C0
- Args:
C0 (float)
sigma (float)
beta (float)
orig (bool, optional) – use the original approach. Not recommended
- Returns:
deviate
- Return type:
- frb.dm.cosmic.build_C0_spline(max_log10_sigma=0.0, npt=100, ret_all=False, beta=4.0)[source]
Generate a spline of C0 vs sigma values for the McQuinn formalism