Skip to main content

Create arbitrary boxes with isotropic power spectra

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

powerbox-0.7.3.tar.gz (3.2 MB view details)

Uploaded Source

Built Distribution

powerbox-0.7.3-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file powerbox-0.7.3.tar.gz.

File metadata

  • Download URL: powerbox-0.7.3.tar.gz
  • Upload date:
  • Size: 3.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for powerbox-0.7.3.tar.gz
Algorithm Hash digest
SHA256 dc0f63d5f5e2a2ecce688b65c4f3b37e43e7be7fd24569969d987578c2a9619d
MD5 6155117280f2a8b81c84fc620d7863e8
BLAKE2b-256 5704a5314e578903d6e4bb00402fc10ccf374420ec75a050937597c09586926f

See more details on using hashes here.

Provenance

File details

Details for the file powerbox-0.7.3-py3-none-any.whl.

File metadata

  • Download URL: powerbox-0.7.3-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for powerbox-0.7.3-py3-none-any.whl
Algorithm Hash digest
SHA256 00c4d8e9b5ac00dfba418d31fd0e90c4452ff1e76d5c4a06ca8bb7e0ab5562e9
MD5 88aff27139bd8df39e26b0e496966583
BLAKE2b-256 cea6e27ec9d8f32f1dd5cc763722b8e355d1c0958621e3f27bbb7eba2da39617

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page