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
Simply pip install powerbox. If you want ~2x speedup for large boxes, you can also install pyfftw by doing pip install powerbox[all]. If you are a conda user, you may want to install numpy with conda first. If you want to develop powerbox, clone the repo and install with python -m pip install -e ".[dev]".
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.7.1.tar.gz
.
File metadata
- Download URL: powerbox-0.7.1.tar.gz
- Upload date:
- Size: 2.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2dc6e9642a22f9a1f8e6b5d3f136944b7edf3bcd8f1adfbfdb2497d8e441b8db |
|
MD5 | b9f9de4929225742763647cf40223f25 |
|
BLAKE2b-256 | ff2d6e227990a1b574ecc047eb4b858140cf628a728794fb27133eec50cb7800 |
File details
Details for the file powerbox-0.7.1-py3-none-any.whl
.
File metadata
- Download URL: powerbox-0.7.1-py3-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 444860848fd08818f0b9368ddba9a5155eff1eda34c10a6af1de06a821d2266d |
|
MD5 | a863569c8c88c91b9b48e28cd79e2ca8 |
|
BLAKE2b-256 | 5ee5ca96cde18d692ccf13255b9cdc7a07fb8fe76279412c209578174d0a5af3 |