Skip to main content

A rectangular pixel map manipulation and harmonic analysis library derived from Sigurd Naess' enlib.

Project description

https://github.com/simonsobs/pixell/workflows/Build/badge.svg https://readthedocs.org/projects/pixell/badge/?version=latest https://codecov.io/gh/simonsobs/pixell/branch/master/graph/badge.svg?token=DOIG32B6NT https://badge.fury.io/py/pixell.svg

pixell is a library for loading, manipulating and analyzing maps stored in rectangular pixelization. It is mainly intended for use with maps of the sky (e.g. CMB intensity and polarization maps, stacks of 21 cm intensity maps, binned galaxy positions or shear) in cylindrical projection, but its core functionality is more general. It extends numpy’s ndarray to an ndmap class that associates a World Coordinate System (WCS) with a numpy array. It includes tools for Fourier analysis (through numpy or pyfftw), spherical harmonic analysis (through ducc0) and wavelet analysis of such maps. It also provides tools for high-resolution visualization (through the Python Image Library).

Dependencies

  • Python>=3.9.

  • gcc/gfortran or Intel compilers (clang might not work out of the box), if compiling from source

  • ducc0, healpy, Cython, astropy, numpy, scipy, matplotlib, pyyaml, h5py, Pillow (Python Image Library)

On MacOS, and other systems with non-traditional environments, you should specify the following standard environment variables:

  • CC: C compiler (example: gcc)

  • FC: Fortran compiler (example: gfortran)

We recommend using gcc installed from Homebrew to access these compilers on MacOS, and you should make sure to point e.g. $CC to the full path of your gcc installation, as the gcc name usually points to the Apple clang install by default.

Runtime threading behaviour

Certain parts of pixell are parallelized using OpenMP, with the underlying ducc0 library using pthreads. By default, these libraries use the number of cores on your system to determine the number of threads to use. If you wish to override this behaviour, you can use two environment variables:

  • OMP_NUM_THREADS will set both the number of pixell threads and ducc0 threads.

  • DUCC0_NUM_THREADS will set the number of threads for the ducc0 library to use, overwriting OMP_NUM_THREADS if both are set. pixell behaviour is not affected.

If you are using a modern chip (e.g. Apple M series chips, Intel 12th Gen or newer) that have both efficiency and performance cores, you may wish to set OMP_NUM_THREADS to the number of performance cores in your system. This will ensure that the efficiency cores are not used for the parallelized parts of pixell and ducc0.

You can check the threading behaviour (and the installation of pixell) by running the benchmark script:

$ benchmark-pixell-runner

Installing

Make sure your pip tool is up-to-date. To install pixell, run:

$ pip install pixell --user

This will install a pre-compiled binary suitable for your system (only Linux and Mac OS X with Python>=3.9 are supported).

If you require more control over your installation, e.g. using Intel compilers, please see the section below on compiling from source.

Compiling from source (advanced / development workflow)

The easiest way to install from source is to use the pip tool, with the --no-binary flag. This will download the source distribution and compile it for you. Don’t forget to make sure you have CC and FC set if you have any problems.

For all other cases, below are general instructions.

First, download the source distribution or git clone this repository. You can work from master or checkout one of the released version tags (see the Releases section on Github). Then change into the cloned/source directory.

Once downloaded, you can install using pip install . inside the project directory. We use the meson build system, which should be understood by pip (it will build in an isolated environment).

We suggest you then test the installation by running the unit tests. You can do this by running pytest.

To run an editable install, you will need to do so in a way that does not have build isolation (as the backend build system, meson and ninja, actually perform micro-builds on usage in this case):

$ pip install --upgrade pip meson ninja meson-python cython numpy
$ pip install  --no-build-isolation --editable .

Contributions

If you have write access to this repository, please:

  1. create a new branch

  2. push your changes to that branch

  3. merge or rebase to get in sync with master

  4. submit a pull request on github

If you do not have write access, create a fork of this repository and proceed as described above. For more details, see Contributing.

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

pixell-0.27.1.tar.gz (6.6 MB view details)

Uploaded Source

Built Distributions

pixell-0.27.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

pixell-0.27.1-cp312-cp312-macosx_14_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.12 macOS 14.0+ ARM64

pixell-0.27.1-cp312-cp312-macosx_13_0_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.12 macOS 13.0+ x86-64

pixell-0.27.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

pixell-0.27.1-cp311-cp311-macosx_14_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.11 macOS 14.0+ ARM64

pixell-0.27.1-cp311-cp311-macosx_13_0_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.11 macOS 13.0+ x86-64

pixell-0.27.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pixell-0.27.1-cp310-cp310-macosx_14_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.10 macOS 14.0+ ARM64

pixell-0.27.1-cp310-cp310-macosx_13_0_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.10 macOS 13.0+ x86-64

pixell-0.27.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

pixell-0.27.1-cp39-cp39-macosx_14_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.9 macOS 14.0+ ARM64

pixell-0.27.1-cp39-cp39-macosx_13_0_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.9 macOS 13.0+ x86-64

File details

Details for the file pixell-0.27.1.tar.gz.

File metadata

  • Download URL: pixell-0.27.1.tar.gz
  • Upload date:
  • Size: 6.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pixell-0.27.1.tar.gz
Algorithm Hash digest
SHA256 79965dd1ab88743a7924d1bd2d7adaad94dd7741e6b8522e0ba741ec4a02ac5e
MD5 c2e21dbda2a8520545ed735d63a99152
BLAKE2b-256 696459e5c17516102dbe89d3263dd45474369a2ee15f8eb201e012c0d974cb73

See more details on using hashes here.

File details

Details for the file pixell-0.27.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pixell-0.27.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4eaec4598a2e2b26a9b32f36c5296fcd084d090a177d280e175c18c910763bb7
MD5 1630b3d2afd62ccc919507377361896a
BLAKE2b-256 6d73a1e4759b8ce30e57ee106a4d9f49ef625f59f7a80e167e814988451ff9cd

See more details on using hashes here.

File details

Details for the file pixell-0.27.1-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for pixell-0.27.1-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 a97f3ad1fb504051e621ebce14713e937d0177fee353281502e924e5a5e8b97e
MD5 91fc3421965ecd05c624ec8e47257d58
BLAKE2b-256 abfe66e8972262fa5d76b0be4cc0d588bac78b7b47044c143e1516408179b2e0

See more details on using hashes here.

File details

Details for the file pixell-0.27.1-cp312-cp312-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for pixell-0.27.1-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 a89cbb8ea1f79430d8a7160a598ce3d5b3e3b4324f8af82f2ee51177ad74485a
MD5 c69b5c6b7aa7fbc0188aaf3426b535eb
BLAKE2b-256 01e7911df75adc7a7d61d140cfe09f339cc753ceef6e3633d1284520ee250228

See more details on using hashes here.

File details

Details for the file pixell-0.27.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pixell-0.27.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d37fffb7f897d43300db6bdb1f9d25ffb1a5bd965767d2a9bc5730da2e651db7
MD5 6eb4e76f3bf8f1f2c95a87808543daec
BLAKE2b-256 88e0277be429cfdad6f1d0786d2de7cb75a83fe99ba4e2e0974f391a1f78fd31

See more details on using hashes here.

File details

Details for the file pixell-0.27.1-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for pixell-0.27.1-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 96b45ce6093e5594368a2acf550cdda9403ee2ea35e23cf26788ce6f272c26fd
MD5 7ef39c6ada7b4e77b1d924664cacad07
BLAKE2b-256 dbab0d0e318d5bc91109660286db297a0e42ba35407c958daaeed734b4c2d9e8

See more details on using hashes here.

File details

Details for the file pixell-0.27.1-cp311-cp311-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for pixell-0.27.1-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 968762995e28f30e408f5b538c6cb84e2a08d9ce9bf2a5e3a4a62302375703ca
MD5 73f45d9c3816554890b7fe0a7b4de52b
BLAKE2b-256 44b97943bb84925f1498d092199a7dc50e71e7548c034ef316eefe72c2468459

See more details on using hashes here.

File details

Details for the file pixell-0.27.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pixell-0.27.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b635b6292498bec1ac431d71cfc4ffa73025ed4a8d530783af2c6274b9987611
MD5 5aa69d09763bc1c34660988ffbfb806e
BLAKE2b-256 f7f1ea46a47e3aeb7378d0ce41ef9e64bddd38c002aeb5451f22c251dd65a3b4

See more details on using hashes here.

File details

Details for the file pixell-0.27.1-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for pixell-0.27.1-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 dc44be3d7a1771e41125c97cb19266a06e814eb0127147e239c815db1ec64b88
MD5 92ffa3b593df0295f1a9c6e81e810137
BLAKE2b-256 d73c76b14edf1d6fadbe1c14b51afc6e5f1c3ebb383668a750a24837d29c80e5

See more details on using hashes here.

File details

Details for the file pixell-0.27.1-cp310-cp310-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for pixell-0.27.1-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 1db22c06343eefc5ff5e5c23427e1f2c62dd54ecc93772d63a157791aa1667a0
MD5 1ead2e7768528966c371dbffc6bd3b90
BLAKE2b-256 35917cf2e762de40502cb71e054a9c96e418a73b1caed97575ca38cc8dbe378e

See more details on using hashes here.

File details

Details for the file pixell-0.27.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pixell-0.27.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 96947ce37b958454335f3260b1ec6212ec286ec4fd42c49324f3258698b55516
MD5 463253d7571e8f74b76605178bc1cca2
BLAKE2b-256 fa11d0883e87c86e210237a4bb175a8363181583e8f3c353b33574ba80dee804

See more details on using hashes here.

File details

Details for the file pixell-0.27.1-cp39-cp39-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for pixell-0.27.1-cp39-cp39-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 80a69e7f731b8055cc3cbd81db690b6be3fd48b7c73f7631c22487c96a6c919b
MD5 0da7add8763640a728d9dd200b3b14d6
BLAKE2b-256 c696e02e7e7d408f3019c58c9949c9d267ac9ec0388a13fc6e02496d1dc9d25f

See more details on using hashes here.

File details

Details for the file pixell-0.27.1-cp39-cp39-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for pixell-0.27.1-cp39-cp39-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 c4e088943ab82e43dfcff457d31ac9aba92a6feac0d09bbb02d827b510403456
MD5 48ff0f5cdd7c5046a3a6caf2c2365f4a
BLAKE2b-256 e07992d7d8728ddc8cb10c3329d4946e39d90623e0d7fcfd248cb5bcb3cfef42

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