Open MeloDi-23 opened 1 week ago
Hello @MeloDi-23! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:
Corrfunc/utils.py
:Line 145:80: E501 line too long (88 > 79 characters) Line 173:80: E501 line too long (99 > 79 characters)
Corrfunc forked:
I rewrite the utils.py, so that the
convert_rp_pi_counts_to_wp
andconvert_3d_counts_to_cf
works more properly. The formal call is still valid, and I added that if you provide weight in the pair-counting, it will account for the weighting.This code will work.
Note that, for simplicity, I didn't add new parameters to the function. Instead you can
weight_normal = weight / weight.mean()
, and pass the parameter in the old way.ND1
, sum of weight of dataset2 toND2
, etc. This is reasonable, because if you assume no weighting(that is weight of every point is 1), then the sum of weights equals to number of points.Both way will work.