rmjarvis / TreeCorr

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

Explicit description for varxi #69

Closed niteshb0804 closed 6 years ago

niteshb0804 commented 6 years ago

Hi Jarvis, I am using TreeCorr for computation of w(theta) for my galaxy catalogues. Command: xi, varxi = dd.calculateXi(rr,dr) It would be helpful to know how the error is computed, i.e varxi; would be great to see an explicit description when one uses single as well as multiple random catalogues.

There is no issue as such but I am getting extremely small values for varxi in contrast to what i can intuitively see in my catalogues. Also please do tell on what exactly you mean by shape noise?

rmjarvis commented 6 years ago

TreeCorr's estimate of varxi is usually an underestimate, since it does not (cannot) include the sample variance component of varxi. So I strongly recommend not trusting it for anything important. Instead, people normally use either jackknife estimates (if you want a variance from the data) or theory/simulation covariance matrices.

But to answer your specific question, the formula for varxi in each bin for NN is simply: [(weight in RR for this bin) * (total weight in all DD bins) / (total weight in all RR bins)]**-1

And shape noise is irrelevant for NN. That only shows up for correlation functions involving G (shear).

niteshb0804 commented 6 years ago

Thanks, this was helpful!

And for multiple random catalogues varxi would be average over them..?

rmjarvis commented 6 years ago

Yes, by "RR" here, I mean the total of all RR pairings if you are providing multiple random catalogs.

niteshb0804 commented 6 years ago

I see. Thanks much! Will see if I can bootstrap for error using TreeCorr w(theta) values for multiple pseudo-random catalogues. This should give a better error estimate.