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.7.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.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

pixell-0.31.7-cp313-cp313-macosx_15_0_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.13macOS 15.0+ x86-64

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

Uploaded CPython 3.13macOS 15.0+ ARM64

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

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

pixell-0.31.7-cp312-cp312-macosx_15_0_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.12macOS 15.0+ x86-64

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

Uploaded CPython 3.12macOS 15.0+ ARM64

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

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

pixell-0.31.7-cp311-cp311-macosx_15_0_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.11macOS 15.0+ x86-64

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

Uploaded CPython 3.11macOS 15.0+ ARM64

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

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

pixell-0.31.7-cp310-cp310-macosx_15_0_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.10macOS 15.0+ x86-64

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

File metadata

  • Download URL: pixell-0.31.7.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.7.tar.gz
Algorithm Hash digest
SHA256 ea1799c31b9caed486411f1fc4aa3bc552d10faedbfb4447ae80df9ac27e0944
MD5 eaa1683eb5357384000c9f9f7db3621c
BLAKE2b-256 941662181f899aaa04a5e2ed55bce41d0220d319120586de45ab416fdbaf2b35

See more details on using hashes here.

File details

Details for the file pixell-0.31.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pixell-0.31.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 33771debf49c67996bf414120681f3deef018fb3aee5160153e75cc53b7049eb
MD5 52ae755b73c19d2aeb14ad99eaa5a22c
BLAKE2b-256 b142665ce7721fbddc48bd5370252f63c686ae0c54ebeb6dcb331f85afd69117

See more details on using hashes here.

File details

Details for the file pixell-0.31.7-cp313-cp313-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for pixell-0.31.7-cp313-cp313-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 9fe4681a2c028f667f1d86fd11eea4baa4b29d99180a09cb1f723af7f33dde41
MD5 2e52b0825dd66112d9f019260a23a9fe
BLAKE2b-256 48cf095003a7c99d4bebaecb25e05d49f9b97b2206f956cdded62ed8b9ededee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.31.7-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 0301df2191e5e38acfbb09deccc97ddb23eb79732e1d589a12f359d46553167b
MD5 72e7bf1688ca1caae9e4207671d35d73
BLAKE2b-256 b379f24e611cb0c11bb2485f7715e497ef0d9fd088c17ee05791260965e1d96b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.31.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cf4dc37351034412ea8de48e30053cbf25587c0831434013f305569e2f85bed3
MD5 491c406f03da2690f5d11aa3e6db8d48
BLAKE2b-256 f5a15a86987fad8e515dbdd7208d50a345ada1f512d50b9d7b7635b871c513bf

See more details on using hashes here.

File details

Details for the file pixell-0.31.7-cp312-cp312-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for pixell-0.31.7-cp312-cp312-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 77253107717958f071e46f14dfd1b13ca6aff9c6d50d64ec637e36f480c66303
MD5 257b81357353644a5f9190bec4016d68
BLAKE2b-256 960dc5acb7590f18b84121475339db354399554d95132896ed555eb41f19a60b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.31.7-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 a8ba9d204e823523038a265209e15067fcb31451c7116e4dfadd4bc35c32f098
MD5 c6c8a90ff6286a356dea83fc0e7556d1
BLAKE2b-256 e02c6277c9764cecc2600e8a05b2e3b086d91c88990d698e04eceb71a0cbcba0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.31.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 93d438b81226a572e0208c909b0953de1d633c153d83188b23cbe42ba5b83e11
MD5 090dfb237924e742786c2f2a63240b02
BLAKE2b-256 a4aa749c7a34a2e9d849e0347b1e11299fab665a54a236f0b2db51efec4431ac

See more details on using hashes here.

File details

Details for the file pixell-0.31.7-cp311-cp311-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for pixell-0.31.7-cp311-cp311-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 3418cd924646ce2337a1c9ff2ca0772d2967657da26f7691743d9f8f5b337d26
MD5 d8ed3e71435b70f2a18e060df1d45f32
BLAKE2b-256 7e3a3ec442e82d4cf38077daeebf3777d3b93cdbb560e92bb1dfba320932f916

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.31.7-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 4bc3411f31b11db89f5edf003764ac598f4d65f59bfee7a385a0d4c0f3fed535
MD5 7ad35ed8f16394319f298d8353a912be
BLAKE2b-256 61f34f5cde69a3e2557551688d75634a71b6b565463bf276f1b802f7a796c382

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.31.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2b859a5edf4de65c4502f53c5244c0d33ad93b12523e0dd09751a74c9b3f3a08
MD5 491fccb9674f4cc3fa867f7456ce952c
BLAKE2b-256 bbdebd7eea2ebe2b53d02dd213d25491aa8874a98548ae7301bb2bad1a450300

See more details on using hashes here.

File details

Details for the file pixell-0.31.7-cp310-cp310-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for pixell-0.31.7-cp310-cp310-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 6d4a47ea0e7c6c77be0a9c3e21384c6f2c6d5c8c0d4de29f09387472bc773578
MD5 6d4c058e6b33ff0dffc0b2f616e6cc4c
BLAKE2b-256 7748e40db4e532c243f07fd9de21efe53cb04709559686b53e4c85a6689cf7f7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.31.7-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 921e94de57608276914937c042871ce8d52a304b309154ed72d510721b4410ad
MD5 b7fa42f69a82382ae77bca88e349866f
BLAKE2b-256 bb17aee159c43b1de54d0332ecabdbd3b6e83c07e27cc0229030a5464379cbed

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