manodeep / Corrfunc

⚡️⚡️⚡️Blazing fast correlation functions on the CPU.
https://corrfunc.readthedocs.io
MIT License
165 stars 50 forks source link

Some questions about API and integrated test suite #288

Closed z20230220 closed 1 year ago

z20230220 commented 1 year ago

I found that there is a clerical error about Corrfunc.theory.package in API reference. The first line of Corrfunc.theory.xi reference is "Function to compute the projected correlation function in a periodic cosmological box. " but I think the bold part should be "correlation function", not "projected correlation function". fig

z20230220 commented 1 year ago

When I want to test whether I install Corrfunc corectly, I encounter a strange situation. There are some detail infomations as follow:

It's obvious that the test is failed, but I can import some functions normally such as wp and xi. What's more, I can use xi to calculate my data, it outputs some warnings.

KW1`BW~YM6{VO@IT~75 4QQ

B%5@MR LW3TE893X0H1`THQ

After that, I change to another env, which is used to install nbodykit package, and the test works, though it outputs same warnings too.

4V0A2DBSZ5TSNT2 7F7@PCY

It's confuse me, I want to understand why the test is failed in the first situation. And how can I solve these warnings? I hope I can solve it to speed up my work. Looking forward to your reply

lgarrison commented 1 year ago

Thanks for the reports! I agree the docs are wrong; would you like to submit a PR? I think there's multiple spots in both of these files where it needs to be fixed:

If you search "projected" (and skip the ones that are about wp), you should find all of them.

lgarrison commented 1 year ago

On the question about the tests, there are a few things going on here. First, in Corrfunc 2.5, we changed the way the tests are run. From the command line, try: python -m pytest --pyargs Corrfunc. This is documented at https://github.com/manodeep/Corrfunc#method-2-pip-installation, but we forgot to update it at https://corrfunc.readthedocs.io/en/master/install.html?highlight=test#verifying-your-installation-1

If you are interested in opening a PR to fix the docs related to your first question, would you like to also fix these docs? The docs at the second link should be made to match the instructions in the first link.

Second, it looks like Corrfunc is installed via conda in both cases. For best performance, we recommend installing from pip or installing from source. The binaries distributed with conda target a very old instruction set for maximum compatibility, but as a result, they are much slower than a source install. There's more discussion about optimization here: https://github.com/manodeep/Corrfunc#method-1-source-installation-recommended

z20230220 commented 1 year ago

Many thanks for your help. My questions are solved faultlessly, everything works well. By the way, this package is really useful and efficient as i've ever seen. I will close the issue, thank you again for the help!