Open EiffL opened 3 years ago
I'm tagging my pre-deadline submission at 9d82248 It works but not optimized yet, so pretty slow at the moment ^^' I'll try to make it more effiicient for fun over the weekend, but if my later version doesn't make it to the challenge, that's ok :-)
Just some additional notes regarding installation, for some reason the setup.py is not placing the compiled bessel_toolsxxxx.so in the right location, so I have to do the following to run:
$ pip install --user -e .
$ cp bessel_tools.cpython-39-x86_64-linux-gnu.so n5k
$ python dsbt_benchmark.py
This PR is to propose a solution for the non-Limber integration challenge based on using a discretisation trick for spherical Bessel transforms when a function is compactly supported on the interval [0, 1]. I used this relation in my very first paper (https://arxiv.org/abs/1112.0561) to define a discrete spherical Bessel transform (DSBT) which reduces the integration problem to simply evaluating a matrix operation. It actually involves turning the integral into a truncated series, with a trade-off on accuracy depending on the order of truncation of that series.
My strategy is to rewrite the integral as: And evaluating each inner integral with the DSBT. It's cool because we only need to compute these inner integrals once for each tracer, and then we can multiply tracers together for the overall integral on k, which can be done with any simple integration method as there is no Bessel function left.
The only expensive part is computing this matrix (requires computing zeros of bessel functions and such), but once it's computed, the evaluation of the transform is super fast because simply a matrix operation. I gave it a first try on the first gg bin: