diff --git a/Corrfunc/io.py b/Corrfunc/io.py index 25b45bd8..7cd4bce8 100644 --- a/Corrfunc/io.py +++ b/Corrfunc/io.py @@ -268,6 +268,7 @@ def read_catalog(filebase=None, return_dtype=np.float): is searched for, and then the ascii file. End-users should always supply the full filename. + """ if filebase is None: diff --git a/Corrfunc/mocks/DDrppi_mocks.py b/Corrfunc/mocks/DDrppi_mocks.py index 50a573f8..48b50cb9 100644 --- a/Corrfunc/mocks/DDrppi_mocks.py +++ b/Corrfunc/mocks/DDrppi_mocks.py @@ -46,6 +46,7 @@ def DDrppi_mocks(autocorr, cosmology, nthreads, pimax, binfile, :math:`\\xi(r_p, \pi)` and :math:`wp(r_p)` respectively from the pair counts. + Parameters ----------- @@ -83,6 +84,7 @@ def DDrppi_mocks(autocorr, cosmology, nthreads, pimax, binfile, .. note:: Only pairs with ``0 <= dz < pimax`` are counted (no equality). + binfile: string or an list/array of floats For string input: filename specifying the ``rp`` bins for ``DDrppi_mocks``. The file should contain white-space separated values @@ -172,6 +174,7 @@ def DDrppi_mocks(autocorr, cosmology, nthreads, pimax, binfile, you need accurate ``rpavg`` values, then pass in double precision arrays for the particle positions. + fast_divide: boolean (default false) Boolean flag to replace the division in ``AVX`` implementation with an approximate reciprocal, followed by a Newton-Raphson step. Improves diff --git a/Corrfunc/mocks/DDtheta_mocks.py b/Corrfunc/mocks/DDtheta_mocks.py index 1c348495..cede373b 100644 --- a/Corrfunc/mocks/DDtheta_mocks.py +++ b/Corrfunc/mocks/DDtheta_mocks.py @@ -39,6 +39,7 @@ def DDtheta_mocks(autocorr, nthreads, binfile, :py:mod:`Corrfunc.utils.convert_3d_counts_to_cf` for computing :math:`\\omega(\theta)` from the pair counts returned. + Parameters ----------- @@ -117,6 +118,7 @@ def DDtheta_mocks(autocorr, nthreads, binfile, at all. For very small angular separations, the brute-force method might be the most numerically stable method. + verbose: boolean (default false) Boolean flag to control output of informational messages @@ -135,6 +137,7 @@ def DDtheta_mocks(autocorr, nthreads, binfile, Use the keyword ``fast_acos`` if you can tolerate some loss of precision. + fast_acos: boolean (default false) Flag to use numerical approximation for the ``arccos`` - gives better performance at the expense of some precision. Relevant only if @@ -149,6 +152,7 @@ def DDtheta_mocks(autocorr, nthreads, binfile, .. note:: Tests will fail if you run the tests with``fast_acos=True``. + (radec)_refine_factor: integer, default is (2,2); typically within [1-3] Controls the refinement on the cell sizes. Can have up to a 20% impact on runtime. @@ -158,6 +162,7 @@ def DDtheta_mocks(autocorr, nthreads, binfile, correspond to ``ra`` and ``dec`` (rather, than the usual three of ``(xyz)bin_refine_factor`` for all other correlation functions). + max_cells_per_dim: integer, default is 100, typical values in [50-300] Controls the maximum number of cells per dimension. Total number of cells can be up to (max_cells_per_dim)^3. Only increase if ``thetamax`` diff --git a/Corrfunc/mocks/vpf_mocks.py b/Corrfunc/mocks/vpf_mocks.py index 1dae43fc..8e5e7c82 100644 --- a/Corrfunc/mocks/vpf_mocks.py +++ b/Corrfunc/mocks/vpf_mocks.py @@ -65,6 +65,7 @@ def vpf_mocks(rmax, nbins, nspheres, numpN, .. note:: p0 is the vpf + threshold_ngb: integer Minimum number of random points needed in a ``rmax`` sphere such that it is considered to be entirely within the mock footprint. The @@ -85,6 +86,7 @@ def vpf_mocks(rmax, nbins, nspheres, numpN, significantly longer to finish. However, subsequent runs can re-use that centers file and will be faster. + cosmology: integer, required Integer choice for setting cosmology. Valid values are 1->LasDamas cosmology and 2->Planck cosmology. If you need arbitrary cosmology, @@ -153,6 +155,7 @@ def vpf_mocks(rmax, nbins, nspheres, numpN, ``centers_file`` needs to be written out. In that case, the RAND_RA, RAND_DEC, and RAND_CZ are used as random centers. + verbose: boolean (default false) Boolean flag to control output of informational messages @@ -170,6 +173,7 @@ def vpf_mocks(rmax, nbins, nspheres, numpN, in all 3 dimensions, the defaults are different from the clustering routines. + max_cells_per_dim: integer, default is 100, typical values in [50-300] Controls the maximum number of cells per dimension. Total number of cells can be up to (max_cells_per_dim)^3. Only increase if ``rmax`` is diff --git a/Corrfunc/theory/DD.py b/Corrfunc/theory/DD.py index 2c89beae..d2cb2a0e 100644 --- a/Corrfunc/theory/DD.py +++ b/Corrfunc/theory/DD.py @@ -31,6 +31,7 @@ def DD(autocorr, nthreads, binfile, X1, Y1, Z1, weights1=None, periodic=True, :py:mod:`Corrfunc.utils.convert_3d_counts_to_cf` for computing for computing :math:`\\xi(r)` from the pair counts returned. + Parameters ----------- @@ -93,6 +94,7 @@ def DD(autocorr, nthreads, binfile, X1, Y1, Z1, weights1=None, periodic=True, If you need accurate ``ravg`` values, then pass in double precision arrays for the particle positions. + (xyz)bin_refine_factor: integer, default is (2,2,1); typically within [1-3] Controls the refinement on the cell sizes. Can have up to a 20% impact on runtime. diff --git a/Corrfunc/theory/DDrppi.py b/Corrfunc/theory/DDrppi.py index a35d75b5..9c0dd175 100644 --- a/Corrfunc/theory/DDrppi.py +++ b/Corrfunc/theory/DDrppi.py @@ -60,6 +60,7 @@ def DDrppi(autocorr, nthreads, pimax, binfile, X1, Y1, Z1, weights1=None, .. note:: Only pairs with ``0 <= dz < pimax`` are counted (no equality). + binfile: string or an list/array of floats For string input: filename specifying the ``rp`` bins for ``DDrppi``. The file should contain white-space separated values @@ -111,6 +112,7 @@ def DDrppi(autocorr, nthreads, pimax, binfile, X1, Y1, Z1, weights1=None, you need accurate ``rpavg`` values, then pass in double precision arrays for the particle positions. + (xyz)bin_refine_factor: integer, default is (2,2,1); typically within [1-3] Controls the refinement on the cell sizes. Can have up to a 20% impact on runtime. diff --git a/Corrfunc/theory/vpf.py b/Corrfunc/theory/vpf.py index 014c7450..4d8c652f 100644 --- a/Corrfunc/theory/vpf.py +++ b/Corrfunc/theory/vpf.py @@ -62,6 +62,7 @@ def vpf(rmax, nbins, nspheres, numpN, seed, .. note:: p0 is the vpf + seed: unsigned integer Random number seed for the underlying GSL random number generator. Used to draw centers of the spheres. @@ -97,6 +98,7 @@ def vpf(rmax, nbins, nspheres, numpN, seed, in all 3 dimensions, the defaults are different from the clustering routines. + max_cells_per_dim: integer, default is 100, typical values in [50-300] Controls the maximum number of cells per dimension. Total number of cells can be up to (max_cells_per_dim)^3. Only increase if ``rmax`` is diff --git a/Corrfunc/theory/wp.py b/Corrfunc/theory/wp.py index 65335ecc..0c1cb6fc 100644 --- a/Corrfunc/theory/wp.py +++ b/Corrfunc/theory/wp.py @@ -39,6 +39,7 @@ def find_fastest_wp_bin_refs(boxsize, pimax, nthreads, binfile, X, Y, Z, .. note:: Only pairs with ``0 <= dz < pimax`` are counted (no equality). + nthreads: integer Number of threads to use. @@ -77,6 +78,7 @@ def find_fastest_wp_bin_refs(boxsize, pimax, nthreads, binfile, X, Y, Z, you need accurate ``rpavg`` values, then pass in double precision arrays for the particle positions. + max_cells_per_dim: integer, default is 100, typical values in [50-300] Controls the maximum number of cells per dimension. Total number of cells can be up to (max_cells_per_dim)^3. Only increase if ``rpmax`` is @@ -153,6 +155,7 @@ def find_fastest_wp_bin_refs(boxsize, pimax, nthreads, binfile, X, Y, Z, .. note:: Since the result might change depending on the computer, doctest is skipped for this function. + """ try: from Corrfunc._countpairs import countpairs_wp as wp_extn @@ -303,6 +306,7 @@ def wp(boxsize, pimax, nthreads, binfile, X, Y, Z, added to the first bin => minimum number of pairs in the first bin is the total number of particles. + Parameters ----------- @@ -317,6 +321,7 @@ def wp(boxsize, pimax, nthreads, binfile, X, Y, Z, .. note:: Only pairs with ``0 <= dz < pimax`` are counted (no equality). + nthreads: integer Number of threads to use. @@ -360,6 +365,7 @@ def wp(boxsize, pimax, nthreads, binfile, X, Y, Z, you need accurate ``rpavg`` values, then pass in double precision arrays for the particle positions. + (xyz)bin_refine_factor: integer, default is (2,2,1); typically within [1-3] Controls the refinement on the cell sizes. Can have up to a 20% impact on runtime. diff --git a/Corrfunc/theory/xi.py b/Corrfunc/theory/xi.py index 1064613b..064d1601 100644 --- a/Corrfunc/theory/xi.py +++ b/Corrfunc/theory/xi.py @@ -34,6 +34,7 @@ def xi(boxsize, nthreads, binfile, X, Y, Z, added to the first bin => minimum number of pairs in the first bin is the total number of particles. + Parameters ----------- @@ -84,6 +85,7 @@ def xi(boxsize, nthreads, binfile, X, Y, Z, you need accurate ``rpavg`` values, then pass in double precision arrays for the particle positions. + (xyz)bin_refine_factor: integer, default is (2,2,1); typically within [1-3] Controls the refinement on the cell sizes. Can have up to a 20% impact on runtime. diff --git a/Corrfunc/utils.py b/Corrfunc/utils.py index 1f3bbae0..d237ba10 100644 --- a/Corrfunc/utils.py +++ b/Corrfunc/utils.py @@ -667,10 +667,12 @@ def gridlink_sphere(thetamax, num_ra_cells: numpy array, returned if ``return_num_ra_cells`` is set A numpy array containing the number of RA cells per declination band + .. note:: If ``link_in_ra=False``, then there is effectively one RA bin per DEC band. The 'ra_limit' field will show the range of allowed RA values. + .. seealso:: :py:mod:`Corrfunc.mocks.DDtheta_mocks` Example