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

Uploaded Source

Built Distributions

pixell-0.27.2-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.2-cp312-cp312-macosx_14_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.12 macOS 14.0+ ARM64

pixell-0.27.2-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.2-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.2-cp311-cp311-macosx_14_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.11 macOS 14.0+ ARM64

pixell-0.27.2-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.2-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.2-cp310-cp310-macosx_14_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.10 macOS 14.0+ ARM64

pixell-0.27.2-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.2-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.2-cp39-cp39-macosx_14_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.9 macOS 14.0+ ARM64

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

File metadata

  • Download URL: pixell-0.27.2.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.2.tar.gz
Algorithm Hash digest
SHA256 1c77ff57ffb2a0ff318de9b3c0e066d2ff404ee29b412a3ff5df576df76b78f8
MD5 892c63d48316271d6f802c8d0ae54941
BLAKE2b-256 26bf7b7cfd2958a62c66f835df57329b53c52c98942a99e7b0d8b7e71b0d7dd8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.27.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5c48c080d48309ae9c7c41c1403b32a3dcfc8a2239cdd8f8f8cf8541d4e1daac
MD5 bb3b5b99eb4653d1c30f7733980bbc33
BLAKE2b-256 8542d2befb47353b61b023b6a59db9bfae3f0dffcf22e7c803f9b8ee87018eaf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.27.2-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 8ff6eb88c363f2d6b3166923346b87c51ca22a262a2eefbd2d4a5de73c8ba77f
MD5 5cb36bb76c590b22a0dbc0ffbdd81c3c
BLAKE2b-256 fc557b28c80ae286e1fd0a278a767c388a0dcd5d6cdc8fa51737ea642eb7f539

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.27.2-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 5ab857ed033242e350f1d57806a465ffd9b86243de7928b8ce5b92903a3822b5
MD5 1f06efb6247eb57a411214567c1630bf
BLAKE2b-256 df6910119b64361d01a42072dc286b42df44fe67986901fe6e0d233d5ca466b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.27.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bf033869b0681235bb5c15a8f0758d8e19c1cd1b76ea8641829b2fdc5e8b8131
MD5 f4152438555d8d2569555ae804a779d4
BLAKE2b-256 6996e156af3ac53e0c5ce2a9f354f00d9c43dd205e90c4cfabb4b3d6c0b0eb6f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.27.2-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 356f9ceab90f1cd9cc372c276e5cc960c0019a4b1b4f6735960f22bfccd3c920
MD5 0034a1292d43a2dbc5a2d11caa3f4332
BLAKE2b-256 081e7539f9e4f76faf7dde2c1cc421b0b9374d94fd8d9dfb2226d2149218847d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.27.2-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 2b8e56a08865f0ccb147e02db088b245b14f655c0029225e82ceb7bda9c4b765
MD5 f4bccfcc11834a513538fb849b975542
BLAKE2b-256 4afe1eb8cbf4e9a6def60d15b04fcb9a1880515afd64d9391ff430c76d4956b9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.27.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 60496e2e56e76a3f434e93292645439048d5084e85ddc640008ccf2311128865
MD5 fb59f81f01bba011546064228f2fa010
BLAKE2b-256 b5b01f0319dd6a54faeaeaeb0521cef19b236b611ccb5163f87302c6eca49ec2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.27.2-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 473eac711ec9ff362114ed64a15585d75603b4f4f81519db4b3d58562eaca873
MD5 309a3c0865ef1e01afc3f46f18720bda
BLAKE2b-256 bced4e6818005834e222f6b69878002522baf51eb6aa8b8d22adf5d232459ca5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.27.2-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 4e05913050ed20b8b10efeeb01f0f9449b6b5fde0b508c716040dfdd3107bc84
MD5 f062328d40ae01ae5ea5073254dcd297
BLAKE2b-256 f2aaf28f32b16efb2c19b5a995eeade4e1593885c91d8da09fb6d25b6ebb7b33

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.27.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6cdda4b73bcdb3f7413bacc6e0e5b5343827918bfdbc51248d85cbeff4237138
MD5 5d907c2805fa929c7d797c3f8f20bf6b
BLAKE2b-256 41a1504bdfae806e8b02edb3a15a04255b04726eedc1e2701053f94b92651a1b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.27.2-cp39-cp39-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 2f858c4821a3aa1e10425422af83c84449681fef010e93851e4a31ebc7162383
MD5 7683e12d1fb31666364634bea51732a7
BLAKE2b-256 fab4fd4a482236e145fb38677b58f6706931542f6af3052879933fac36f41793

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.27.2-cp39-cp39-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 7edf7f2d0023b66ad7f4494528d0a4655f53eaa8a54ed1f93ff412d9dde836c5
MD5 0bf7f7f8e3f29d0496d2e50af2df6bec
BLAKE2b-256 3ba9b40d1842a0bd2b8d698d5f7781cb46644899ae74882a32708302957ec399

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