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

  • libsharp2 (downloaded and installed, if compiling from source)

  • automake (for libsharp2 compilation, if compiling from source)

  • healpy, Cython, astropy, numpy, scipy, matplotlib, pyyaml, h5py, Pillow (Python Image 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 your own installation of libsharp2, using Intel compilers or enabling tuning of the libsharp2 installation to your CPU, 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.

Existing libsharp installation (optional)

libsharp2 is installed automatically by the setup.py you will execute below. The installation script will attempt to automatically git clone the latest version of libsharp2 and compile it. If instead you want to use an existing libsharp2 installation, you can do so by symlinking the libsharp2 directory into a directory called _deps in the root directory, such that pixell/_deps/libsharp2/build/include/libsharp2/sharp.h and pixell/_deps/libsharp2/build/lib/libsharp2.so exist. If you are convinced that the libsharp2 library is successfully compiled, add an empty file named pixell/_deps/libsharp2/success.txt to ensure pixell’s setup.py knows of your existing installation.

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, either add the cloned directory to your $PYTHONPATH, if you want the ability for changes made to Python source files to immediately reflect in your installation, e.g., in your .bashrc file,

export PYTHONPATH=$PYTHONPATH:/path/to/cloned/pixell/directory

or alternatively, install the package

$ python setup.py install --user

which requires you to reinstall every time changes are made to any files in your repository directory.

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.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.17.2.tar.gz (6.9 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.17.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

pixell-0.17.2-cp311-cp311-macosx_10_13_x86_64.whl (9.4 MB view details)

Uploaded CPython 3.11macOS 10.13+ x86-64

pixell-0.17.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

pixell-0.17.2-cp310-cp310-macosx_10_13_x86_64.whl (9.4 MB view details)

Uploaded CPython 3.10macOS 10.13+ x86-64

pixell-0.17.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.9 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

pixell-0.17.2-cp39-cp39-macosx_10_13_x86_64.whl (9.4 MB view details)

Uploaded CPython 3.9macOS 10.13+ x86-64

pixell-0.17.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.0 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

pixell-0.17.2-cp38-cp38-macosx_10_13_x86_64.whl (9.4 MB view details)

Uploaded CPython 3.8macOS 10.13+ x86-64

pixell-0.17.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.7 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

pixell-0.17.2-cp37-cp37m-macosx_10_13_x86_64.whl (9.4 MB view details)

Uploaded CPython 3.7mmacOS 10.13+ x86-64

File details

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

File metadata

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

File hashes

Hashes for pixell-0.17.2.tar.gz
Algorithm Hash digest
SHA256 a97b10f3982f576214064c6a41b1c7cab071a6c058d8903ec8ba785f0c72b364
MD5 d45c68efce17f6843e2b5fd068a46335
BLAKE2b-256 7277e907b27be0569380ead94030256ad2a878df4e33043ce665d3c6c3ade67d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.17.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a10f0584640f52238a968b30eff955a2183833ab2cae2cda8a474a941b45fe2f
MD5 fb980650ff2f7ac10eb91a94d826e2cb
BLAKE2b-256 78f907e23d00a1cde7c03d36944b13f091a7f2a73b63ca9343da6a0668b0719a

See more details on using hashes here.

File details

Details for the file pixell-0.17.2-cp311-cp311-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for pixell-0.17.2-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 5e95794863fc8878d1dd206a43c3e6a163dc7e96ff2c9848174a736ec79d6a8c
MD5 5e053720c4f70e81ebdc806ea14bef3c
BLAKE2b-256 26baa55885e27a38cc0f73c1befc1304d7aa7aa0d22ae272fd7db629193a9fc9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.17.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ba1b294a9d85dc370fe7a2aae6d8d9dfb19b54528d408394c93dad4b8ec57a17
MD5 af94401679457d9eeaa25143bda5c23a
BLAKE2b-256 6daa07de514a6df3b5774d56cce1d02599006ea7556013aac8f98278c15fa8ce

See more details on using hashes here.

File details

Details for the file pixell-0.17.2-cp310-cp310-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for pixell-0.17.2-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 eaa2faa8850f460e173f6da9cbf49a5761ba4200f61129022926fd9ad3e4bbac
MD5 c59ea7491bb8ac7a9acffa4b972cfd88
BLAKE2b-256 33078093e7ce85e99b0fa495034ba963c325f25c14003830b94d77e1d00cbe9f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.17.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dcd2c9bd76fa5cdea421fe673ca037550dc04d9758e9f574d2deb9baa2b80574
MD5 cd56ad9876cab9f4cd0f3e167769de5e
BLAKE2b-256 bedbe1b62f20578dc3d9c558e16f78d32bd5820aade6cb3f2f4eb6c7ef56251c

See more details on using hashes here.

File details

Details for the file pixell-0.17.2-cp39-cp39-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for pixell-0.17.2-cp39-cp39-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 e9680ff06d42fa5b518dfb0b20e6aa898c0473ad3af850e582f5951739ad3927
MD5 3a4a86ae7e4efe390d9ca59492e9dcb6
BLAKE2b-256 357554cbdd10572458e21e0810465c9a0f5539e6be819cc2d9ff9f0d0e99bc74

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.17.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 abe5737da3cc5d6f84eca0bf68e6aadb4e7ec24bc03eaa3d56674e65cd99c285
MD5 360261608961449f2c518f9233dffb19
BLAKE2b-256 11b893983f7b3b4fd1a1483e48d277f07f56aaf9deb7811b8831d56d7e8598ec

See more details on using hashes here.

File details

Details for the file pixell-0.17.2-cp38-cp38-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for pixell-0.17.2-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 76bf8e6ed4ed4b1a89ce78c6e1fbf5ecc44b361fb63939167e1d8d6451adb20a
MD5 4ac9e66461c8f3e5714880d3385734ef
BLAKE2b-256 ea139a22093a1cd339707bc91646a156452c83a09c2bb96ed9aa2c62031b7b0b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pixell-0.17.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7b2a431bf1399a6d4bcc87eef487408c405acf0aef4be853cc565a65c0d0ee96
MD5 214c06ea603ac62696b6e66257a5f154
BLAKE2b-256 392a52076024cc863d500ebb56bc56b37f8679de4441395272b39cff9e169331

See more details on using hashes here.

File details

Details for the file pixell-0.17.2-cp37-cp37m-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for pixell-0.17.2-cp37-cp37m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 f9fe8a049e9e3dbe6f7eac379daf960cc1498e2cd03e8557b4c1146bcecfc57b
MD5 dff4c6cb3a59b6c54e1769967e4798ee
BLAKE2b-256 d4042f27cbeecc381380d697520fc102019b59798b953ac55017fcc9b7066d03

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