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

Let variance values (vark, varg, varv) be specifiable for a Catalog. #159

Closed rmjarvis closed 1 year ago

rmjarvis commented 1 year ago

This PR implements the request from @AlexGKim in issue #154 to allow the variance values of a field to be specifiable on input, rather than computed directly from the values in the catalog. This is most applicable if the noise properties of a field are known better than the empirical variance from a potentially small subset of that field.

I also fixed a slight error in the varg calculation that it was assuming the mean shear is zero. It now computes the actual mean when computing the variance. In most use cases, this difference is negligible, but I can imagine cases where there could be a non-trivial mean shear that you'd want to subtract, so might as well do it right.