Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
Expand Down
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Fixes
- Check and fix ``z`` vs ``cz`` in ``DDrppi_mocks`` and ``DDsmu_mocks`` only if comoving distance flag is not set [#275]
- Update GNU assembler bug detection [#278]
- Fix installation instructions and update README.rst [#285]
- Remove mistaken references to "projected" correlation function in docs [#289]


2.4.0 (2021-09-30)
Expand Down
2 changes: 1 addition & 1 deletion Corrfunc/mocks/DDrppi_mocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def DDrppi_mocks(autocorr, cosmology, nthreads, pimax, binfile,
copy_particles=True, enable_min_sep_opt=True,
c_api_timer=False, isa=r'fastest', weight_type=None):
"""
Calculate the 2-D pair-counts corresponding to the projected correlation
Calculate the pair-counts corresponding to the 2-D correlation
function, :math:`\\xi(r_p, \\pi)`. Pairs which are separated by less
than the ``rp`` bins (specified in ``binfile``) in the
X-Y plane, and less than ``pimax`` in the Z-dimension are
Expand Down
2 changes: 1 addition & 1 deletion Corrfunc/mocks/DDsmu_mocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def DDsmu_mocks(autocorr, cosmology, nthreads, mu_max, nmu_bins, binfile,
copy_particles=True, enable_min_sep_opt=True,
c_api_timer=False, isa='fastest', weight_type=None):
"""
Calculate the 2-D pair-counts corresponding to the projected correlation
Calculate the 2-D pair-counts corresponding to the correlation
function, :math:`\\xi(s, \\mu)`. The pairs are counted in bins of
radial separation and cosine of angle to the line-of-sight (LOS). The
input positions are expected to be on-sky co-ordinates. This module is
Expand Down
4 changes: 2 additions & 2 deletions Corrfunc/theory/xi.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def xi(boxsize, nthreads, binfile, X, Y, Z,
copy_particles=True, enable_min_sep_opt=True,
c_api_timer=False, isa=r'fastest'):
"""
Function to compute the projected correlation function in a
Function to compute the correlation function in a
periodic cosmological box. Pairs which are separated by less
than the ``r`` bins (specified in ``binfile``) in 3-D real space.

Expand Down Expand Up @@ -186,7 +186,7 @@ def xi(boxsize, nthreads, binfile, X, Y, Z,
try:
from Corrfunc._countpairs import countpairs_xi as xi_extn
except ImportError:
msg = "Could not import the C extension for the projected "\
msg = "Could not import the C extension for the "\
"correlation function."
raise ImportError(msg)

Expand Down
25 changes: 14 additions & 11 deletions docs/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The simplest way to install the latest release of the code is with pip. Before i

.. code:: python

pip install Corrfunc
python -m pip install Corrfunc

This will install the latest official release of the code.
If you want the latest master branch,
Expand All @@ -31,10 +31,10 @@ The first step is to clone the Corrfunc repository

.. code::

git clone https://github.com/manodeep/Corrfunc.git
cd Corrfunc
make install
python -m pip install . (--user)
git clone https://github.com/manodeep/Corrfunc.git
cd Corrfunc
make install
python -m pip install . (--user)


.. _corrfunc_dependencies:
Expand Down Expand Up @@ -64,17 +64,20 @@ Verifying your installation

After installing Corrfunc, you should run the integrated test suite to make
sure that the package was installed correctly. If you installed from source,
then type the following in the root package directory,
then run the following sequence from the repository root directory:

.. code::
.. code:: console

make tests
make tests # run the C tests
python -m pip install pytest
python -m pytest # run the Python tests

If you installed using pip/conda, then use the following to run the tests
from your shell:

.. code:: python
.. code:: console

from Corrfunc.tests import tests
tests()
python -m pytest --pyargs Corrfunc


Once you have installed the package, see :ref:`quickstart` for instructions on how to get up and running.
4 changes: 2 additions & 2 deletions theory/python_bindings/_countpairs.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ static PyMethodDef module_methods[] = {
" zbin_refine_factor=1, max_cells_per_dim=100, copy_particles=True,\n"
" enable_min_sep_opt=True, c_api_timer=False, isa=-1)\n\n"

"Function to compute the projected correlation function in a periodic\n"
"Function to compute the correlation function in a periodic\n"
"cosmological box. Pairs which are separated by less than the ``r``\n"
"bins (specified in ``binfile``). *Always* uses ``PERIODIC`` boundary conditions.\n\n"

Expand Down Expand Up @@ -625,7 +625,7 @@ static PyMethodDef module_methods[] = {
"results : A python list\n"
" A python list containing [rmin, rmax, ravg, weightavg, xi, npairs] for each radial\n"
" bin specified in the ``binfile``. If ``output_ravg`` is not set then\n"
" ``ravg`` will be set to 0.0 for all bins; similarly for ``weightavg``. ``xi`` contains the projected\n"
" ``ravg`` will be set to 0.0 for all bins; similarly for ``weightavg``. ``xi`` contains the\n"
" correlation function while ``npairs`` contains the number of unique pairs\n"
" in that bin. If weights are used, then ``xi`` is weighted, while ``npairs`` is not.\n\n"

Expand Down
29 changes: 25 additions & 4 deletions theory/wp/wp_kernels.c.src
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,14 @@ static inline int wp_avx512_intrinsics_DOUBLE(DOUBLE *x0, DOUBLE *y0, DOUBLE *z0
} //OUTPUT_RPAVG
}//end of j-loop over second set of particles
}//loop over first set of particles


#ifdef COUNT_VECTORIZED
uint64_t npairs_found = 0;
#endif
for(int i=0;i<nbin;i++) {
#ifdef COUNT_VECTORIZED
npairs_found += npairs[i];
#endif
src_npairs[i] += npairs[i];
if(need_rpavg) {
src_rpavg[i] += rpavg[i];
Expand Down Expand Up @@ -618,9 +622,13 @@ static inline int wp_avx2_intrinsics_DOUBLE(DOUBLE *x0, DOUBLE *y0, DOUBLE *z0,
}//remainder loop over second set of particles
}//loop over first set of particles

#ifdef COUNT_VECTORIZED
uint64_t npairs_found = 0;
#endif
for(int i=0;i<nbin;i++) {
#ifdef COUNT_VECTORIZED
npairs_found += npairs[i];
#endif
src_npairs[i] += npairs[i];
if(need_rpavg) {
src_rpavg[i] += rpavg[i];
Expand Down Expand Up @@ -972,9 +980,13 @@ static inline int wp_avx_intrinsics_DOUBLE(DOUBLE *x0, DOUBLE *y0, DOUBLE *z0, c
}//remainder loop over second set of particles
}//loop over first set of particles

#ifdef COUNT_VECTORIZED
uint64_t npairs_found = 0;
#endif
for(int i=0;i<nbin;i++) {
#ifdef COUNT_VECTORIZED
npairs_found += npairs[i];
#endif
src_npairs[i] += npairs[i];
if(need_rpavg) {
src_rpavg[i] += rpavg[i];
Expand Down Expand Up @@ -1306,10 +1318,15 @@ static inline int wp_sse_intrinsics_DOUBLE(DOUBLE *x0, DOUBLE *y0, DOUBLE *z0, c
}//searching for kbin loop
}
}

#ifdef COUNT_VECTORIZED
uint64_t npairs_found = 0;
#endif
for(int i=0;i<nbin;i++) {
src_npairs[i] += npairs[i];
#ifdef COUNT_VECTORIZED
npairs_found += npairs[i];
#endif
src_npairs[i] += npairs[i];
if(need_rpavg) {
src_rpavg[i] += rpavg[i];
}
Expand Down Expand Up @@ -1499,11 +1516,15 @@ static inline int wp_fallback_DOUBLE(DOUBLE *x0, DOUBLE *y0, DOUBLE *z0, const w
}//searching for kbin loop
}
}


#ifdef COUNT_VECTORIZED
uint64_t npairs_found = 0;
#endif
for(int i=0;i<nbin;i++) {
src_npairs[i] += npairs[i];
#ifdef COUNT_VECTORIZED
npairs_found += npairs[i];
#endif
src_npairs[i] += npairs[i];
if(need_rpavg) {
src_rpavg[i] += rpavg[i];
}
Expand Down