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

Uploaded CPython 3.13macOS 15.0+ ARM64

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

Uploaded CPython 3.12macOS 15.0+ ARM64

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

Uploaded CPython 3.11macOS 15.0+ ARM64

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

File metadata

  • Download URL: pixell-0.31.10.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.10.tar.gz
Algorithm Hash digest
SHA256 8bfd542941efd899c4977c0dd71e3ed08b1eb609372948d3c5167938cbbdc621
MD5 bfbc21b59a5dd58768c8199ee1178838
BLAKE2b-256 d64274f9af450667074feff09a74460019d98c689a5027b0143f3daf9df1adaa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.31.10-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 78bf01ab3b5462c10893337317e023ec58d7e855fc5d122da043cf00989f84b3
MD5 4a06a396d125966d756d17e1cdf2af39
BLAKE2b-256 088c34b8637da085a647bcb3fca6570fffa5084009613d0ad218d839bf6638d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.31.10-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 36bd61e78416610bdc1647f40747f30f51a56800f62b4d92ae9912aff577cd64
MD5 45637b512e89cca4d7309cb40d3358c4
BLAKE2b-256 cb3b94e619b1754383e3bc880d469bfa75f2eb03067dc52516f7939add76994b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.31.10-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 83f36620748c05bf59e46073d4a5ba174e770a704dcc1a18e57edf7910844ca1
MD5 3adf5ba36d271d80f1365fb7356eca98
BLAKE2b-256 5e5d8fe2b4da06c6d8f1805e7d065b3e94d89b9b46e1fb51e159f7289c889318

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.31.10-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 36e5a676fd6d85e8f1334834a61c7ccb243769efbc73ba8b65f83c9ea004878e
MD5 88cded943437daff1c516ba21358723b
BLAKE2b-256 a2dc4fd86fcecd8d03013af6268a8e130f124e4508fa0cbff50180187e5e18b3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.31.10-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 401e1c631d7748c0a55965826eef4d1555755cbd628a4e8cb313841abc90703b
MD5 8c06a1837e487e531c326f5fb51445ac
BLAKE2b-256 b91f6328cd6551e9177c8806511635b5c27c6c9edf0b994aa91ac588b53a2dc4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.31.10-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 4984b32ad4d3dce518a3cec5248c0ec0a7fba5d07d6d603f8cafb0d5887e2093
MD5 2113df45ed22e781a46a0aa334793c56
BLAKE2b-256 f51010c2077fcd8fc935b5e337d568ed513ad8380f3f8595299c06f261b07ab0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.31.10-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6b087fd8ccdf1fcc56dfd39580e1c59a732a3887392eebdba36a859d3c609f15
MD5 19dfcce7230f7368bca9c0217c09cd97
BLAKE2b-256 54b649364da09eddbdf6cb537bdffb193e6ff27f7f078772107a42a0dcccdf85

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.31.10-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 ed70777ea60ac4aa872a84050f7743618ef603a0962e6791e5779a4f9a70b1ec
MD5 72cba5b4af0160741ff1c4c71474d837
BLAKE2b-256 206c91c438e34921ae4a67a9ad01748026d6611aafb7923bd486c45d6efcfafd

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