quadrature_convolution
- zdm.survey.quadrature_convolution(width_function, width_args, scat_function, scat_args, internal_logvals, bins, backproject=False)[source]
Numerically evaluates the resulting distribution of y=sqrt{x1^2+x2^2}, where x1 is the width distribution, and x2 is the scattering distribution.
- Parameters:
width_function (float function(float,args)) – function to call giving p(logw) dlogw
width_args (*list) – arguments to pass to width function
scat_function (float function(float,args)) – function to call giving p(logtau) dlogtau
scat_args (*list) – arguments to pass to scattering function
internal_vals (np.ndarray) – numpy array of length NIbins giving internal values of log dw to use for internal calculation purposes.
bins (np.ndarray([NBINS+1],dtype='float')) – bin edges for final width distribution
backproject (bool, optional) – if True, calculates p(tau|totalw) and p(w|totalw) for this redshift, and returns additional values.
- Returns:
histogram of probability within bins wfracs (np.ndarray,only if backproject): p(tau|tw) taufracs (np.ndarray,only if backproject): p(w|tw)
- Return type:
hist (np.ndarray)