Create arbitrary boxes with isotropic power spectra
Project description
Make arbitrarily structured, arbitrary-dimension boxes and log-normal mocks.
powerbox is a pure-python code for creating density grids (or boxes) that have an arbitrary two-point distribution (i.e. power spectrum). Primary motivations for creating the code were the simple creation of log-normal mock galaxy distributions, but the methodology can be used for other applications.
Features
Works in any number of dimensions.
Really simple.
Arbitrary isotropic power-spectra.
Create Gaussian or Log-Normal fields
Create discrete samples following the field, assuming it describes an over-density.
Measure power spectra of output fields to ensure consistency.
Seamlessly uses pyFFTW if available for ~double the speed.
Installation
powerbox only depends on numpy >= 1.6.2, which will be installed automatically if powerbox is installed using pip (see below). Furthermore, it has the optional dependency of pyfftw, which if installed will offer ~2x performance increase in large fourier transforms. This will be seamlessly used if installed.
To install pyfftw, simply do:
pip install pyfftw
To install powerbox, do:
pip install powerbox
Alternatively, the bleeding-edge version from git can be installed with:
pip install git+git://github.com/steven-murray/powerbox.git
Finally, for a development installation, download the source code and then run (in the top-level directory):
pip install -e .
Acknowledgment
If you find powerbox useful in your research, please cite the Journal of Open Source Software paper at https://doi.org/10.21105/joss.00850.
QuickLinks
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file powerbox-0.5.7.tar.gz
.
File metadata
- Download URL: powerbox-0.5.7.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6b25668298d68f2b39d67a66ee5f5ce84e6c504d329b001884dab2e6567f41d |
|
MD5 | d9ad1fee00fd1850d437d9628a0cc323 |
|
BLAKE2b-256 | 868239aa2697c5d678d5d9764d99799d83f19d06bd0e27d8e824486a8a7cb739 |
File details
Details for the file powerbox-0.5.7-py3-none-any.whl
.
File metadata
- Download URL: powerbox-0.5.7-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 499b157db3d2d92f3e28c7a2407f4dbead3d03eda3f33ec5af3d56673acab737 |
|
MD5 | e4373a8adb752047dcd2f3ba7b9f32e8 |
|
BLAKE2b-256 | d140dc8631b9a93293a399b9f2325adc55b606c3450c700c27b7ea3b7020bdcb |