Skip to main content

pixell

Project description

pixell

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 targeted 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 transforms (through numpy or pyfft) and spherical harmonic transforms (through ducc0) of such maps and tools for visualization (through the Python Image Library).

Dependencies

  • Python>=3.7

  • 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)

  • CXX: C++ compiler (example: g++)

  • 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.

You will also need to specify the environment variable DUCC0_NUM_THREADS for correct runtime behaviour on MacOS (e.g. running the test suite), specifying the number of threads to run certain parallel operations with. This should typically be set to the number of physical cores on your machine. If you recieve an error saying Assertion failure no thread pool active, it is likely that this variable is either unset or set to a garbage value that cannot be interpreted by the ducc0 library.

Installing

Make sure your pip tool is up-to-date. To install pixell, run:

$ pip install pixell --user
$ test-pixell

This will install a pre-compiled binary suitable for your system (only Linux and Mac OS X with Python>=3.7 are supported). Note that you need ~/.local/bin to be in your PATH for the latter test-pixell to work.

If you require more control over your installation, e.g. using Intel compilers, please see the section below on compiling from source. The test-pixell command will run a suite of unit tests.

Compiling from source (advanced / development workflow)

For compilation instructions specific to NERSC/cori, see NERSC.

For all other, 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.

Run setup.py

If not using Intel compilers (see below), build the package using

$ python setup.py build_ext -i

You may now test the installation:

$ py.test pixell/tests/

If the tests pass, you can install the package (optionally with -e if you would like to edit the files after installation)

$ python setup.py install --user

Intel compilers

Intel compilers require you to modify the build step above as follows

$ python setup.py build_ext -i --fcompiler=intelem --compiler=intelem

On some systems, further specification might be required (make sure to get a fresh copy of the repository before trying out a new install method), e.g.:

$ LDSHARED="icc -shared" LD=icc LINKCC=icc CC=icc python setup.py build_ext -i --fcompiler=intelem --compiler=intelem

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.

History

0.21.0 (2023-10-19)

Changes relative to 0.19.2 include:

  • More miscellaneous fixes after transition to ducc0

  • More work on wavelets

  • We now provide MacOS x86_64 wheels

  • Improved build system that respects choices of CC, CXX, and FC

0.19.2 (2023-08-18)

Changes relative to 0.19.0 include:

  • Important bugfixes for the migration from libsharp2 to ducc0

  • Improved SHT unit tests

0.19.0 (2023-07-14)

Changes relative to 0.17.3 include:

  • Migrate fully from libsharp2 to ducc0 (for curved sky functions)

  • Temporary suspension of MacOS pip binaries (use pip install pixell==0.17.3 for Macs in the meantime)

  • Miscellaneous fixes

0.17.3 (2023-03-17)

Changes relative to 0.17.2 include:

  • More support for fejer1

0.17.2 (2023-02-21)

Changes relative to 0.17.1 include:

  • Build for Python 3.11

0.17.1 (2023-01-26)

Changes relative to 0.16.0 include:

  • Bilinear map-making pixel window function

  • Miscellaneous new functions and API improvements

  • Miscellaneous bug fixes

  • Fixes for Apple Silicon

0.16.0 (2022-06-08)

Changes relative to 0.15.3 include:

  • Wavelet analysis

  • Fast C-based source simulation

  • Fast vectorized radial profile binning

  • Fixes and improvements to HDF5 I/O

  • Fixes to OSX support

0.15.3 (2022-02-12)

Changes relative to 0.15.1 include:

  • New wheels that fix numpy binary incompatibility errors

0.15.1 (2022-01-23)

Changes relative to 0.14.3 include:

  • More flexible enmap.read_map_geometry

  • Add Python 3.10 support, drop Python 3.6 support

0.14.3 (2021-12-13)

Changes relative to 0.14.2 include:

  • Updates to enmap.insert, UHTs and WCS string accuracy

0.14.2 (2021-11-23)

Changes relative to 0.14.1 include:

  • An important bugfix for enmap.downgrade when the op argument is passed. This bug has been present since v0.14.0 and in commits on master since Aug 12, 2021.

0.14.1 (2021-11-16)

Changes relative to 0.13.2 include:

  • A breaking change to map2alm where it no longer approximates WCS if ring weights are unavailable

  • Miscellaneous bug fixes

  • ducc0 FFT support and fast rotate_alm

  • Tiled map support

  • New healpix <-> rectpix reprojection API

0.13.2 (2021-07-16)

Changes relative to 0.13.1 include:

  • Added binaries for MacOS 11 Big Sur

0.13.1 (2021-07-08)

Changes relative to 0.13.0 include:

  • Fixes to the MacOS wheel building

0.13.0 (2021-07-08)

Changes relative to 0.12.1 include:

  • Matched filtering in a new analysis module

  • Conjugate gradients solver

  • Discrete cosine transforms

  • Miscellaneous bug fixes

0.12.1 (2021-04-30)

Changes relative to 0.12.0 include:

  • Patch to fix numpy binary incompatibility issues caused by changes to the numpy C API. We now require numpy >1.20.

0.12.0 (2021-04-13)

Changes relative to 0.11.2 include:

  • We now use libsharp2 instead of libsharp, which has signficantly faster SHTs

  • Major breaking change: the meaning of the “iau” flag has been corrected and reversed. The default behaviour of map2harm and other functions using this flag will be different.

  • Unified harmonic transforms module

  • postage_stamp removed in favor of thumbnails

  • Adjoint harmonic transforms

0.11.2 (2021-02-04)

Changes relative to 0.11.0 include:

  • Bug-fix for distance_transform when using rmax

0.11.0 (2021-02-02)

Changes relative to 0.10.3 include:

  • Bug-fix for enmap.project that led to crashes

  • enplot improvements

  • Improvements to fft and ifft overhead

  • alm filtering API improvements

  • Changes to CMB dipole parameter

  • Allow lmax!=mmax in curvedsky routines

  • Python 3.9 builds and Github actions instead of Travis

0.10.3 (2020-06-26)

Changes relative to 0.10.2 include:

  • Bug fix for automatic IAU -> COSMO, recognizes POLCCONV instead of POLCONV.

0.10.2 (2020-06-26)

Changes relative to 0.9.6 include:

  • Automatically converts maps recognized to be in IAU polarization convention (through the FITS header) to COSMO convention by flipping the sign of U

  • Fixes a centering issue in reproject.thumbnails

  • Optimizes posmap for separable projections and pixsizemap for cylindrical projections making these functions orders of magnitude faster for CAR (and other projections)

  • A test script test-pixell is distributed with the package

0.9.6 (2020-06-22)

Changes relative to 0.6.0 include:

  • Ability to read compressed FITS images

  • Fixed a bug to make aberration and modulation accurate to all orders

  • Expanded alm2cl to handle full cross-spectra and broadcasting

0.6.0 (2019-09-18)

Changes relative to 0.5.2 include:

  • Improvements in accuracy for map extent, area and Fourier wavenumbers

  • Spherical harmonic treatment consistent with healpy

  • Additional helper functions, e.g enmap.insert

  • Helper arguments, e.g. physical normalization for enmap.fft

  • Bug fixes e.g. in rand_alm

  • Improved installation procedure and documentation

0.5.2 (2019-01-22)

  • API for most modules is close to converged

  • Significant number of bug fixes and new features

  • Versioning system implemented through versioneer and bumpversion

  • Automated pixel level tests for discovering effects of low-level changes

0.1.0 (2018-06-15)

  • First release on PyPI.

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.21.0.tar.gz (7.2 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.21.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

pixell-0.21.0-cp311-cp311-macosx_10_9_x86_64.whl (8.8 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

pixell-0.21.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

pixell-0.21.0-cp310-cp310-macosx_10_9_x86_64.whl (8.8 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

pixell-0.21.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.6 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

pixell-0.21.0-cp39-cp39-macosx_10_9_x86_64.whl (8.8 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

pixell-0.21.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.7 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

pixell-0.21.0-cp38-cp38-macosx_10_9_x86_64.whl (8.8 MB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

pixell-0.21.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.4 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

File details

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

File metadata

  • Download URL: pixell-0.21.0.tar.gz
  • Upload date:
  • Size: 7.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for pixell-0.21.0.tar.gz
Algorithm Hash digest
SHA256 5040a9a70de5d1fbe9574c4964104476fc3844b170a9b8397bf427a47516bf18
MD5 4fe46f98c670b85c47011b107d004c47
BLAKE2b-256 71edfbea2980d7651c2cf7f117b421bddb7c76159a5a4147da7c0b5f34d9db6b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.21.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6322094c79889e0ecfe57a28e03d798bf6f93b8b665c01c1d918b94edf2bd2ff
MD5 2906fab57184b1d9c84c474b4211c8f4
BLAKE2b-256 4c60efbd6af5b732c66999f68b0c752de4695e347239b1e8e203dd1bb582ba94

See more details on using hashes here.

File details

Details for the file pixell-0.21.0-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pixell-0.21.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a3e65720b20a5ae89af45f014461be162ee334c081bde5be7399839890808cdf
MD5 07499341753ff89ec55131a67cd466ec
BLAKE2b-256 9c8ce7725cd05c8e1553c49bd4d16c79ea03ab4782796052e72a03b626a75e4d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.21.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 624aef37e7850cbf23af32887c9b96d4e1d9bd4f2bed0be734a6ab883a6c8039
MD5 066fea0b09c646961e1f966e164d17f6
BLAKE2b-256 b29e5fa1e8f4541a2f3ea2316c53714cfa135be60d87b235e78c6aab2899ea6c

See more details on using hashes here.

File details

Details for the file pixell-0.21.0-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pixell-0.21.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 08b1156c36e5802a24a2ad0aa2b3f327b9d90d1461638a7884b7d6cfc6e652c0
MD5 d3baf973cf1a8f894ccc91bffeb9946d
BLAKE2b-256 b23206cf738370b7395fdfdae6be38043218d31bb171a18ea3a84c8c60e71419

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.21.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b181178c18ecc4791b1d35fc9cce0a00215ec758c57a3206f9d13227cc4ac040
MD5 f310195339fc63fcade155348f1154a7
BLAKE2b-256 0927890a5fc8c92d9462364381418d779edadc4374fa9c56ab91ae6232cc6b8f

See more details on using hashes here.

File details

Details for the file pixell-0.21.0-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pixell-0.21.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f967d6d15facd9319c7a9ed0bb8752ad8868b7be4e7bf0cbc5f5ce38430097f3
MD5 a9b1edb39e7cc72564a7b9a031148110
BLAKE2b-256 4612aa9e11522f599358dba0e55b76ab5669de85be787f7d61a6c33374c998bc

See more details on using hashes here.

File details

Details for the file pixell-0.21.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pixell-0.21.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2329fa23d20d119fa368cdc3b16ef0754a7efb0f53108027e45c274f260ce3d4
MD5 320bb5b828ce02f8866d7a10b6d02890
BLAKE2b-256 25e6f8dfed7da25f1e49eb4ffa9288d9497c2765a57730a09219e87b04535fb9

See more details on using hashes here.

File details

Details for the file pixell-0.21.0-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pixell-0.21.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d2c2d9b91402b5a4bc4e2a44252d4365022b68a1d824e95b2457703ae169b51c
MD5 c50f73652f0101be2556c6908fa1cd58
BLAKE2b-256 bbd8c19e1d10cc0b9b4d0285505c7afc435819341b6bfc3f67fcffbc48b4cf1b

See more details on using hashes here.

File details

Details for the file pixell-0.21.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pixell-0.21.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9d999844e2a1edc562b1931cf68a305e097a91640840f414665b3454778f86b9
MD5 1b3e15f016b5f1d71a5bc8cbf4024c34
BLAKE2b-256 a7bc33748ed9be31eb438cd8a6f57a01e945cca962ae019c9d7769e70a2ad9d1

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