suave: The Continuous-Function Estimator
This is an implementation of the Continuous-Function Estimator, a generalization of the standard (Landy-Szalay) estimator for the two-point correlation function. We call this tool suave which means smooth in Spanish (pronounced swah-beh), as it can produce smooth (continuous) correlation functions. It is built within the Corrfunc package, by Manodeep Sinha and Lehman Garrison; check out the full Corrfunc README at the original repo.
The 2-point correlation function measures the clustering of galaxies (or other tracers) as a function of scale. Traditionally, this is done by counting the pairs of galaxies in a given separation bin, and normalizing by the pairs in a uniform random catalog.
The Continuous-Function Estimator eliminates the need for binning, in separation or any other quantity. Rather, it projects the pairs onto any user-defined set of basis functions. It replaces the pair counts with vectors, and the random normalization vector term with a matrix, that describe the contribution of the pairs to each basis function. The correlation function can then be directly evaluated at any separation, resulting in a continuous estimation.
An example script for using the estimator is in example_theory.ipynb. The Continuous-Function Estimator is currently implemented in the DD(s, mu) pair counting statistic for both mock and theory data. Currently implemented bases are tophat and piecewise. General r-dependent basis functions can be read in from a file; helper routines for these include spline basis functions of any order and a baryon acoustic oscillation fitting function.
The paper presenting this method can be found at https://arxiv.org/abs/2011.01836 (Storey-Fisher & Hogg, Accepted to ApJ). Feel free to email k.sf@nyu.edu with any comments or questions, or submit an issue.
Installation
Pre-requisites
Suave has most of the same pre-reqs as Corrfunc, as well as a couple more:
make >= 3.80
OpenMP capable compiler like icc, gcc>=4.6 or clang >= 3.7. You should already have a system install, but on mac/linux you can install gcc with conda install gcc.
gsl >= 2.4. Use either conda install -c conda-forge gsl (MAC/linux) or (sudo) port install gsl (MAC) to install gsl if necessary.
python >= 2.7 or python>=3.4 for compiling the C extensions.
numpy >= 1.7 for compiling the C extensions.
scipy >= 1.6 for the spline basis functions for suave (lower versions may work but untested)
colossus >= 1.2 for the BAO basis functions for suave (lower versions may work but untested)
six >= 1.15 (colossus dependency, lower versions may work but untested)
Install with pip
You can install suave via pip. We recommend doing this into a clean conda environment. You can do this and install the dependencies with the following set of commands:
$ conda create -c conda-forge -n suaveenv python gsl $ conda activate suaveenv $ pip install suave
Install from source
You should also be able to install from source. Once again you can do this in a clean conda environment:
$ conda create -c conda-forge -n suaveenv python gsl $ conda activate suaveenv $ git clone https://github.com/kstoreyf/suave/ $ cd suave $ make $ make install $ pip install . (--user)
Citing
If you use or reference suave, please cite the ApJ paper with this bibtex entry (this will be updated once the accepted paper is published):
@misc{storeyfisher2020twopoint,
title={Two-point statistics without bins: A continuous-function generalization of the correlation function estimator for large-scale structure},
author={Kate Storey-Fisher and David W. Hogg},
year={2020},
eprint={2011.01836},
archivePrefix={arXiv},
primaryClass={astro-ph.CO}
}
If you use the code, please additionally cite the original MNRAS Corrfunc code paper with the following bibtex entry:
@ARTICLE{2020MNRAS.491.3022S,
author = {{Sinha}, Manodeep and {Garrison}, Lehman H.},
title = "{CORRFUNC - a suite of blazing fast correlation functions on
the CPU}",
journal = {\mnras},
keywords = {methods: numerical, galaxies: general, galaxies:
haloes, dark matter, large-scale structure of Universe, cosmology:
theory},
year = "2020",
month = "Jan",
volume = {491},
number = {2},
pages = {3022-3041},
doi = {10.1093/mnras/stz3157},
adsurl =
{https://ui.adsabs.harvard.edu/abs/2020MNRAS.491.3022S},
adsnote = {Provided by the SAO/NASA
Astrophysics Data System}
}
Finally, if you benefit from the enhanced vectorised kernels in Corrfunc (not currently used in suave but likely used if you’re also using out-of-the-box Corrfunc), then please also cite this paper:
@InProceedings{10.1007/978-981-13-7729-7_1,
author="Sinha, Manodeep and Garrison, Lehman",
editor="Majumdar, Amit and Arora, Ritu",
title="CORRFUNC: Blazing Fast Correlation Functions with AVX512F SIMD Intrinsics",
booktitle="Software Challenges to Exascale Computing",
year="2019",
publisher="Springer Singapore",
address="Singapore",
pages="3--20",
isbn="978-981-13-7729-7",
url={https://doi.org/10.1007/978-981-13-7729-7_1}
}
LICENSE
Suave is released under the MIT license. Basically, do what you want with the code, including using it in commercial application.
Project URLs
Documentation (http://suave.rtfd.io/)
Source Repository (https://github.com/kstoreyf/suave)
Original Corrfunc Documentation (http://corrfunc.rtfd.io/)
Original Corrfunc Source Repository (https://github.com/manodeep/Corrfunc)
Support
This work was supported by a NASA FINESST grant under award 80NSSC20K1545.
Metadata
Release files for suave 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| suave-0.0.6.tar.gz | 29.4 MB | Without provenance | Details for suave-0.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| suave-0.0.6-cp37-cp37m-macosx_10_14_x86_64.whl | CPython 3.7 | CPython 3.7 pymalloc | macOS 10.14+ x86-64 | Details for suave-0.0.6-cp37-cp37m-macosx_10_14_x86_64.whl |
Total release size: 128.0 MB
Release files / suave-0.0.6.tar.gz
| Download URL | suave-0.0.6.tar.gz |
|---|---|
| Size | 29.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
02a5aeedc65a036fe69568f052ee0432b33a2c80d8c42834abc9e6efb18cb552
|
|
BLAKE2b-256 checksum How to use checksums |
f04922faaddbc81d0f5e60aaf102ea06c0925cabb161d6a48290574ab5a11162
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3
|
Release files / suave-0.0.6-cp37-cp37m-macosx_10_14_x86_64.whl
| Download URL | suave-0.0.6-cp37-cp37m-macosx_10_14_x86_64.whl |
|---|---|
| Size | 98.7 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
912dec89f1cf7014ec0e6450aff3fdb46dbd5e22072d87a16c902a1ef0f16d47
|
|
BLAKE2b-256 checksum How to use checksums |
7a71b6b977782c583d5c99f7f88f08bcc739e82b95be6491d520ec09afde8f84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3
|
Security for suave 0.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.