-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pair correlations #524
Pair correlations #524
Conversation
…n function for one sample, which will be used to validate multisample function
…number of samples. Tests notebook validates the accuracy, function options, and extension to 2+ dimensions.
@SvenPVoigt nice job. I'll hopefully review this in the next few days. |
… into SvenPVoigt-pair-correlations
I'm a little confused. I think that |
New
|
Make paircorr_from_twopoint more functional. Split steps into sub-functions to make it easier to determine the steps. paircorr_from_twopoint is added to the API docs. The test notebook has been removed as the only significant tests where already doc strings. The function works with Dask correctly and is tested with Dask.
@SvenPVoigt I've made a PR into your branch. You probably should merge upstream's master and rebase and then I'll redo the PR. Anyway I've made things more functional. Also,
You might want to check that you're happy with the API docs. |
Make pair correlations function more functional
Use less verbose output so that Travis CI failures are easier to parse.
The rendering for table views of Dask arrays changes from version to version so can't be included in tests.
Ignore the rendering of Dask arrays in the notebooks when testing. The Dask array rendering is subject to HTML style changes so that tests will break whenever the Dask array changes how the table is rendered. To test for dask arrays, explicitly test the values, chunks or shape.
@auag92, @beyucel : can you both review this now. It's ready. Also, @SvenPVoigt can you also give your seal of approval in the comments. Thanks |
@auag92 @beyucel : I added @SvenPVoigt new function to the API so please check that it reads well, https://pymks--524.org.readthedocs.build/en/524/API.html#pymks.paircorr_from_twopoint |
Pair Correlations can be calculated in many ways. In this pull request, I am calculating pair correlations from 2point statistics- in the new function
paircorr_from_twopoint
. One caveat of using two point statistics is that at large r values, probability values become very small and closely spaced. Therefore, the function provides acutoff_r
and aninterpolate_n
parameter for dealing with probabilities at large r values.Additionally, I provide a
dist_from_center
function, which could be used in other functions as well because it is so generic.I put both functions in
pair_correlations.py
, but I am open to addingdist_from_center
infunc.py
andpaircorr_from_twopoint
incorrelations.py
. If I change the location of the functions, is there a git tool (maybe the squash and merge option) for cleaning up commits so that only the changes to final (not intermediate) files are represented?Also, if there is any area for increasing the usage of dask, please let me know. I will try to identify some additional spots as well. Right now, I am simply validating that dask and numpy arrays can be passed as input to my functions.