Skip to main content

powerbox

https://img.shields.io/pypi/v/powerbox.svg https://travis-ci.org/steven-murray/powerbox.svg?branch=master https://coveralls.io/repos/github/steven-murray/powerbox/badge.svg?branch=master https://api.codacy.com/project/badge/Grade/5853411c78444a5a9c6ec4058c6dbda9 https://zenodo.org/badge/72076717.svg http://joss.theoj.org/papers/10.21105/joss.00850/status.svg

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.

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)

Source distribution for powerbox 1.0.0
File Size Uploaded
powerbox-1.0.0.tar.gz 5.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for powerbox 1.0.0
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.9.0

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.7

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page