diff --git a/CHANGES.rst b/CHANGES.rst index 1b2f128a..0b98413b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -13,6 +13,10 @@ New features 2.4.0 (upcoming) ================== +Enhancements +------------ +- In the theoretical VPF calculation (``theory.vpf``), the total volume of the random spheres can now exceed the volume of the sample [#238] + Bug fixes --------- - Fix Python reference leak to results struct [#229] diff --git a/Corrfunc/theory/vpf.py b/Corrfunc/theory/vpf.py index e5cda955..ce659756 100644 --- a/Corrfunc/theory/vpf.py +++ b/Corrfunc/theory/vpf.py @@ -196,22 +196,6 @@ def vpf(rmax, nbins, nspheres, numpN, seed, msg = "Number of counts-in-cells wanted must be at least 1" raise ValueError(msg) - if boxsize > 0.0: - volume = boxsize * boxsize * boxsize - else: - volume = (max(X) - min(X)) * \ - (max(Y) - min(Y)) * \ - (max(Z) - min(Z)) - - volume_sphere = 4. / 3. * pi * rmax * rmax * rmax - if nspheres * volume_sphere > volume: - msg = "There are not as many independent volumes in the "\ - "requested particle distribution. Num. spheres = {0} "\ - "rmax = {1} => effective volume = {2}.\nVolume of particles ="\ - "{3}. Reduce rmax or Nspheres"\ - .format(nspheres, rmax, nspheres * volume_sphere, volume) - raise ValueError(msg) - # Ensure all input arrays are native endian X, Y, Z = [convert_to_native_endian(arr, warn=True) for arr in [X, Y, Z]]