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

powerbox only depends on numpy >= 1.6.2, which will be installed automatically if powerbox is installed using pip (see below). Furthermore, it has the optional dependency of pyfftw, which if installed will offer ~2x performance increase in large fourier transforms. This will be seamlessly used if installed.

To install pyfftw, simply do:

pip install pyfftw

To install powerbox, do:

pip install powerbox

Alternatively, the bleeding-edge version from git can be installed with:

pip install git+git://github.com/steven-murray/powerbox.git

Finally, for a development installation, download the source code and then run (in the top-level directory):

pip install -e .

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.6.1.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

powerbox-0.6.1-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: powerbox-0.6.1.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

File hashes

Hashes for powerbox-0.6.1.tar.gz
Algorithm Hash digest
SHA256 5a58c7c0c24976af6e69a0cebc4ecaf7ed992175a6314d8a7f7436715b64a004
MD5 a33d58d16d47b87a1f7423662205e855
BLAKE2b-256 3669beba1ec65d8572e5eb36048c3b2d54526efcd43a764b47735a780e168682

See more details on using hashes here.

File details

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

File metadata

  • Download URL: powerbox-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

File hashes

Hashes for powerbox-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 99a6ca4cf1a05690445be136bc1eeaa7e690cefcabf66f51dc1f39bfd8b4f40c
MD5 cb5f3eef2f03c63e5ae7489a15e2d736
BLAKE2b-256 5663ddbe29a662d6936e6515bac48b0c07f06506971c2367285b17a0a84a8c35

See more details on using hashes here.

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