icecube / FIRESONG

FIRst Extragalactic Simulation Of Neutrino and Gamma-ray
Other
18 stars 8 forks source link

High density speed #20

Closed mjlarson closed 3 years ago

mjlarson commented 3 years ago

Replaces the InverseCDF's internal UnivariateSpline with scipy's interp1d in order to reduce the number of calculations needed for an evaluation, dropping the processing time for high densities by around 70%. This works towards improving the issue raised in #15.

Also fixes #19 by changing InverseCDF's internal code to assume that the cdf values received correspond exactly to the given redshifts and not to averages over redshift bins.