Open manodeep opened 8 years ago
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 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
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.