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.9.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.9-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.9-cp313-cp313-macosx_15_0_arm64.whl (2.1 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

pixell-0.31.9-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.9-cp312-cp312-macosx_15_0_arm64.whl (2.1 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

pixell-0.31.9-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.9-cp311-cp311-macosx_15_0_arm64.whl (2.1 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

pixell-0.31.9-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.9-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.9.tar.gz.

File metadata

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

File hashes

Hashes for pixell-0.31.9.tar.gz
Algorithm Hash digest
SHA256 78d78687cd4e07bd5ae5da1ab5c4e0f4e01fe2fdca648ce587e5a048df85e06a
MD5 184d8b2b19d0948bb9f879993855ed72
BLAKE2b-256 3f892b539e8ed0b98999668b7f8985a7f3e5b590c62d4eb20039c447b95f576f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.31.9-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e80c3c96a4b1689cc4bd7bd102dd641de8a597b70d785453fd72d38e15d9b1e6
MD5 0429f4ad173f2681ee790237d89d4142
BLAKE2b-256 b0e4fdd0009d771de5a8722d03d8aea26f6eb579d84eb90b35e99334f98060c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.31.9-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 1ef6d23085c1df845ac8e98772f5af34199c5879771541ca576b2a02854a29c4
MD5 471d125217b183cb026a51e96dda5797
BLAKE2b-256 fd72cd13ecb06f9b8fbfa76e403be39f7c6e338b8f49f2b262310d26f22420cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.31.9-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 36abf1da68caf485ccba80467f7af7313bf2ea4448b093f8fa93742c840822a3
MD5 78468fa22fe4df0318ec522122ff7bf5
BLAKE2b-256 3455430b03aa2030c8a61cdb2f0f55553f8c5f29526ce133cd35b84da20f7b50

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.31.9-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 e09cee0f17fb50baa2fe96196c74cd3f3e740d30d397f4c75f3ead6347a1d6ae
MD5 e0c47f6e2921d4aaeebf1760a8192ae0
BLAKE2b-256 8b8cbe2349c951afeae0543fcc8f99113b156093577c912840b089e5d846ab81

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.31.9-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b2382a9acd8d4178e191f286cfc1e9a0efd307257df2c94e507be439249729b8
MD5 04d5a0e28c0f95af5bd4a20e8792311f
BLAKE2b-256 62f1ab03af98e44034de58620bbf72913f2d243e23b6edb11696388725ff1552

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.31.9-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 9eaf15c0801f81e053e8c9f91d79c0976fe8f1f121c5b906baa90471c0337a08
MD5 7b9065f74bbeeb0d6171bde3d8276b14
BLAKE2b-256 6974f5aefed22733e19bd23f415d0b84a3a5eb3b3a29ab71cdd8925a746884a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.31.9-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9d49b4fa476afc6126333f2ac3454ddeb5abd2c5c23a8b917c183dce85e1b952
MD5 ff17f3d33971a42b359377a6682d44a6
BLAKE2b-256 2b30cbccb92087c152888187848a365bec1a7a5f3316cef102c1a47452dd8c67

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.31.9-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 8faf67527c28c56ccb6a7a0db100d04de6e66e591d2bad7fca1214ce70c7f882
MD5 64c08d16efa4af50e3827cc2956317f4
BLAKE2b-256 d31766d2357068c129dcca62ecc586edb7715cc2ce9eab410f24e32cde167305

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