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.8.0.tar.gz
.
File metadata
- Download URL: powerbox-0.8.0.tar.gz
- Upload date:
- Size: 3.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2af84e1709232d958fb013d688a3949b0fe85e834bdf1632444266023b45c344 |
|
MD5 | ae02521433dcbd2bb82f8d26d424af02 |
|
BLAKE2b-256 | 373898bdc27b6bfdb888643e40beafdff998ebaa3ce94758d4d5802ff68ee499 |
File details
Details for the file powerbox-0.8.0-py3-none-any.whl
.
File metadata
- Download URL: powerbox-0.8.0-py3-none-any.whl
- Upload date:
- Size: 21.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3bbb759200dac1609211576f6e6920cb185579f8818c3c03152ca8676449c98 |
|
MD5 | 799eb034a27ad01342f511307df18332 |
|
BLAKE2b-256 | c1adb775b21c8bdf9b5584bb271bb7e37fd77a2cdcd7057d6c695f790e493d91 |