Open MeloDi-23 opened 6 days ago
Thanks @MeloDi-23 for using Corrfunc and opening the issue. The utility uses only the raw pair counts and assumes weights are not involved. If you need a weighted correlation function, unfortunately, you will have to account for the semantics of the weights and the weighting scheme you have used and then normalise accordingly to get the correct correlation function.
Thanks for the resply! Can you add some notice to that in the doc? e.g. in the Typical Tasks for Computing Correlation Functions part, the standard pipeline is first using DD- function to calculate the count and using convert- function to calculate the correlation. DD- function has parameters of weight, but convert- function does not utilize the result. I think this is rather misleading.
Hmm - I suppose that's fair enough. Since you found the wording unclear - do you mind sending through a pull request with a proposed fix?
General information
Issue description
I want to calculate the correlation function from a LSS catalogue. The LSS catalogue has some weighting factor, and I want to calculate the real weighted correlation function. But I find out that if I use
DDrppi_mocks
andconvert_rp_pi_counts_to_wp
, it will give the exactly the same wp no matter I use weighting or not. Is this ignored intentionally or by mistake?Expected behavior
Get the correct $\xi$ and $w_p$ with weighting.
Actual behavior
The code does not care about the weighting.
What have you tried so far?
I checked the result of
DDrppi_mocks
, and I think it calculated the weight. Then I checked the source code ofconvert_rp_pi_counts_to_wp
, and find out that it does not contain any code about the weight. So I'm trying to write my own version, making use ofDD['weightavg']
.Minimal failing example