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.9.0.tar.gz (4.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

powerbox-0.9.0-py3-none-any.whl (27.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: powerbox-0.9.0.tar.gz
  • Upload date:
  • Size: 4.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for powerbox-0.9.0.tar.gz
Algorithm Hash digest
SHA256 3664bbecf0250fc57e0d85229e9eb21783622f0f2ce949d6b6372c0363574c98
MD5 d4e2bd30d50dfe1125ff8a22c674a025
BLAKE2b-256 d6e7c651c9f7e6f6c6478d3aa57ed56e05d78f5b82786b1996f70caf23e91d01

See more details on using hashes here.

File details

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

File metadata

  • Download URL: powerbox-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 27.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for powerbox-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4cab84617914575959928efec913ba8afb05774c7b54b97e9158e21846289837
MD5 220a6f15cec5ac6a452ff8b22cf7d216
BLAKE2b-256 ac6760827f6e4bd1378855f746676ad32c5cf646a41d71f6b1df8a6c6c0daf73

See more details on using hashes here.

Supported by

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