powerbox
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
Metadata
Release files for powerbox 1.0.0
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 | |
|---|---|---|---|---|
| powerbox-1.0.0.tar.gz | 5.1 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| powerbox-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.1 MB
Release files / powerbox-1.0.0.tar.gz
| Download URL | powerbox-1.0.0.tar.gz |
|---|---|
| Size | 5.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
24b06ec3eed543f7b2d9c7d00da1af1e7ba33bdf23782ebfa7215c90aa7c8587
|
|
BLAKE2b-256 checksum How to use checksums |
6de97bbc8a9ac512a890f082545ff90986257ad646680481b906350f63600e99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / powerbox-1.0.0-py3-none-any.whl
| Download URL | powerbox-1.0.0-py3-none-any.whl |
|---|---|
| Size | 50.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d39405023cabda223e29519311c74ede71fde20da649365b462acd870de54304
|
|
BLAKE2b-256 checksum How to use checksums |
b8b2cbb2df59c837e46fe8cd81f7699811376a5b90c28d5bf82edf34483463bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for powerbox 1.0.0
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.