Comments (7)
Yes, I think you're right! Everything should be computed using the weights. Would you like to open a PR?
from corrfunc.
@adematti Do you need the weighted average separations for your Science case or is this more of a consistency/implementation choice question?
@lgarrison We had a long discussion about this when you first started implementing the weights within Corrfunc. We came to the conclusion that it was better to leave the average separations as is - since that would be the most likely use-case. And that if any user required a weighted separation, then they could "easily" add a custom weight function and keep track of the weighted mean separation.
from corrfunc.
@manodeep well, I'd think the weighted version would be the most intuitive convention for the separation average ; this is the definition we will use in DESI --- though we will most certainly make sure cosmological results do not depend on this choice.
In case one'd not want the weighted-average version, it would be straightforward to recompute the pair counts without weights.
Anyway, it's just fine to have this change only in the branch we are currently using in DESI :)
from corrfunc.
@manodeep, thanks, I had forgotten our discussion! It's coming back to me now. However, since adding the weights over 5 years ago (!), I think I've changed my mind on the issue. It seems to me that assigning a particle a weight of 2 ought to behave as if that particle appeared twice in the input data, at least if the user has specified the pair_product
weighting scheme.
Or, the more flexible thing would be to add a new column to the output called weighted_ravg
, so that the user has access to both the unweighted and weighted version, just like they have access both npairs
and weightavg
. But that's more work than just making ravg
weighted.
My vote would be to make ravg
weighted in Corrfunc proper, but it's also not a tiny amount of work. So if you would like to keep Corrfunc as-is @manodeep or if @adematti you don't have the spare effort for a PR right now, then keeping the change in your fork is fine by me too.
from corrfunc.
Alright great - as always I prefer to add a user-option that allows either weighted or unweighted average separations. Would the plan be the same - provide the default PAIR_PRODUCT weighted average for separations? And anything else the user has to code those up?
Regardless, if we do change the behaviour, we should try to keep backwards compatibility by default. That way this is not a breaking change but rather a functionality update.
What do y'all think?
from corrfunc.
Yeah, we already have an output_ravg
field that we normally set to True
, but we could allow the user to set that to the string 'weighted'
instead. Then the average separation would just inherit whatever weighting scheme the user is using.
from corrfunc.
To me this seems like a good idea.
I had weighted average separation implemented upon the current master version in https://github.com/adematti/Corrfunc/tree/separation-avg. Yet, this branch does not allow for the option that you suggest for output_ravg and some things would need to be modified if #258 is accepted.
from corrfunc.
Related Issues (20)
- script hangs when using unbuffered output HOT 17
- ld: library not found for -liomp5 when installing HOT 5
- DDsmu and DDsmu_mocks give different results HOT 4
- cz vs z check and fixing by speed of light on comoving distances HOT 2
- test failure after pip install HOT 8
- Can't install Corrfunc on google colab HOT 2
- pytest fails on local supercomputer (Skylake cpus) HOT 3
- Custom compiler instruction for pip does not work HOT 2
- Corrfunc DDtheta_mocks DEC range HOT 4
- Some questions about API and integrated test suite HOT 4
- GitHub CI runners need to be updated
- Add asv benchmarks HOT 1
- M2 compiling issues HOT 22
- DDtheta: numerical stability of small angular separation in float32 HOT 14
- Help with installing on macOS Ventura 13 HOT 3
- Xi from LRGs.dat HOT 3
- Option to use S/DGEMM within lattice-pairs HOT 11
- Readthedocs build fails on changing the CPython interpreter to 3.x HOT 1
- Add new AVX/SSE calls for cos/sin functions HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from corrfunc.