Skip to main content

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

Project description

https://img.shields.io/github/actions/workflow/status/simonsobs/pixell/build.yml?branch=master 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


Release history Release notifications | RSS feed

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

Uploaded Source

Built Distributions

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

pixell-0.31.8-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pixell-0.31.8-cp313-cp313-macosx_15_0_arm64.whl (2.1 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

pixell-0.31.8-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pixell-0.31.8-cp312-cp312-macosx_15_0_arm64.whl (2.1 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

pixell-0.31.8-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pixell-0.31.8-cp311-cp311-macosx_15_0_arm64.whl (2.1 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

pixell-0.31.8-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pixell-0.31.8-cp310-cp310-macosx_15_0_arm64.whl (2.1 MB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for pixell-0.31.8.tar.gz
Algorithm Hash digest
SHA256 f634956557f45132ec708c29640f6426d5fb2dd7f101c49f16e8cc87af8a487b
MD5 3c3baed70b8888b6c2e5931d44a43a05
BLAKE2b-256 289b04af578074b95b30fadd029f2234dbd6b5dff7bb5f1f87554978d76acfb7

See more details on using hashes here.

File details

Details for the file pixell-0.31.8-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pixell-0.31.8-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 72a24fb0c2e6d59ea1a4c2955eff4642fd6d0bb27b2cc61e1f57e2edb7d953ec
MD5 acb6ca40a45ed0bd887827cbe735e0fa
BLAKE2b-256 2b9cbb8e381915d9ae2620302fa4eecb0a53332105f04d3918edccec13ce7e57

See more details on using hashes here.

File details

Details for the file pixell-0.31.8-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pixell-0.31.8-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 fd5c213a75664b2e142099072e63e4cfe36f0c6aeda444672b718ee5ec8e106f
MD5 b2ff61563fb222991e6e7df890a3bee3
BLAKE2b-256 7a100ad2f1b0c49fc987fa788dacfeb4025492d90bc5f8284c24b1de03a2c026

See more details on using hashes here.

File details

Details for the file pixell-0.31.8-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pixell-0.31.8-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7003e2bfa877d3a3cd0aafcf652ec6a9f41bff206e25c76fa11b2229c0c72e8a
MD5 85bf8fc5d0b81732127ba1c699a2fc12
BLAKE2b-256 f50e40e5d74b7a978d7ccff1175bfdb38d7b8bcea5e917d4f83d2f71b1feedae

See more details on using hashes here.

File details

Details for the file pixell-0.31.8-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pixell-0.31.8-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 35cceb17a62d1d227edb3e0d3a25cf9d58f685a55590613345bf4b21a81271ab
MD5 549634795a826ce50ef856a669a841ef
BLAKE2b-256 390dca398d2a9176a4a8495abc00b0b813a213f951d2c00007c6cf245ba53365

See more details on using hashes here.

File details

Details for the file pixell-0.31.8-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pixell-0.31.8-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3e4d6134793fd11118057a83b62a6c52bba7dd2de47d5aa7df8dc706079f11ec
MD5 b46992f634379991a69b6fa6106b6755
BLAKE2b-256 14698bfa9f26aabcb355385569f059f912f89da0416787695e5e43eb6bf0b938

See more details on using hashes here.

File details

Details for the file pixell-0.31.8-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pixell-0.31.8-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 298347187bd90bc83448879d8750c9efce7eb413ffbcb110aea8c986859e689c
MD5 248fd6d6b449a0d82bb5c83f91984392
BLAKE2b-256 f408391815da1a5409d4619116632d6cf68fbbe05633aa7f3304ad5eaca52a29

See more details on using hashes here.

File details

Details for the file pixell-0.31.8-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pixell-0.31.8-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fbe815a3dcb11fde0f5eb7f743938a2d26fd0a757ea1e6d9ba8b17b14e797735
MD5 ca5523c7629a081b49a5386d457389cb
BLAKE2b-256 78cd179ebfa4991c6ab5a86a4e86511af2700d84afdf2f504c68018652657fd9

See more details on using hashes here.

File details

Details for the file pixell-0.31.8-cp310-cp310-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pixell-0.31.8-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 e5fcc9f14490962a9a09148e15c58a96a81a74a6caeac619fa566c6d45c61cd2
MD5 87035e3f5d92f8b93fadf532a8c5b1b4
BLAKE2b-256 2e2abef89cd5a456f92bef166467930b7b7558a1647858dddfaa9e46ab90a54f

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