calc_DMG_weights

zdm.iteration.calc_DMG_weights(DMEGs, DMhalos, DM_ISMs, dmvals, sigma_ISM=0.5, sigma_halo_abs=15.0, log=False)[source]

Given an uncertainty on the DMG value, calculate the weights of DM values to integrate over

Inputs:

DMEGs = Extragalactic DMs DMhalo = Assumed constant (average) DMhalo DM_ISMs = Array of each DM_ISM value dmvals = Vector of DM values used sigma_ISM = Fractional uncertainty in DMG values sigma_halo = Uncertainty in DMhalo value (in pc/cm3)

Returns:

weights = Relative weights for each of the DM grid points iweights = Indices of the corresponding weights