rmjarvis / TreeCorr

Code for efficiently computing 2-point and 3-point correlation functions. For documentation, go to
http://rmjarvis.github.io/TreeCorr/
Other
97 stars 37 forks source link

Add LogSAS binning for 3pt correlations #165

Closed rmjarvis closed 6 months ago

rmjarvis commented 6 months ago

The current binning for 3pt correlations is based on SSS definitions of triangles. I.e. the three side lengths. This has some advantages with regard to the tree descent, since side lengths are easy to calculate, but it has proven awkward for some applications where SAS binning is more scientifically relevant.

This PR adds LogSAS as a new bin type for 3pt correlations using SAS definitions of the triangles. This binning is in log(r) for two side lengths, and in phi, the angle between these two sides. This binning is particularly attractive for implementing the Philcox/Porth et al algorithm for 3pt correlations using a multipole expansion, where the SAS binning is more or less required.

Along the way, I realized a much nicer UI for doing directed cross correlations. Now rather than use the GGGCrossCorrelation class (and similar), the regular class's process method has a new option, ordered=True, which directs the code to keep the ordering of the three cells fixed during the tree traversal, rather than letting them change orientations. This is both more intuitive and often more efficient, since one will likely not usually want all 6 permutations, so the code will now skip a lot of unnecessary calculations when doing this.