Corrfunc icon indicating copy to clipboard operation
Corrfunc copied to clipboard

Run a brute force for low particle number

Open manodeep opened this issue 8 years ago • 2 comments

There is no point constructing all of the lattices for (say) N <= 100. All functions need a brute-force algorithm for really low particle number.

manodeep avatar Aug 23 '16 07:08 manodeep

I would like to second this enhancement request. As a case in point, I am calculating the correlation function for 47383 galaxies in the TNG300 205 Mpc/h periodic box, but am limited* to an rmax of around 65 Mpc/h, even though there are lots of pairs one could use to 100 Mpc/h and beyond.

*Error message: ../../utils/gridlink_utils_float.c> ERROR: nlattice = 4 is so small that with periodic wrapping the same cells will be counted twice ....exiting ../../utils/gridlink_utils_float.c> Please reduce Rmax = 100.000000 to be a smaller fraction of the particle distribution region = 205.000000

JonLoveday avatar Aug 20 '19 09:08 JonLoveday

@JonLoveday The issue you are facing is slightly different. In the theory pair-counters, we simply check to make sure that a left neighbouring cell does not become a right neighbouring cell after periodic wrapping.

Your issue is fixable with a duplicate cell check when adding in a new neighbouring cell. Such a check already exists for \omega(\theta), when both RA and DEC binning are enabled. The relevant code is here

manodeep avatar Aug 21 '19 00:08 manodeep