pixell
Project description
pixell
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).
Free software: BSD license
Documentation: https://pixell.readthedocs.io.
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)
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, 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:
create a new branch
push your changes to that branch
merge or rebase to get in sync with master
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.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
Built Distributions
Hashes for pixell-0.20.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 548732c9b3de210393f9851c810e0e7cf1173cae31ca3b46dff9f9515c495ba6 |
|
MD5 | 4161edb13fe5437b983548410629307e |
|
BLAKE2b-256 | 53cc188ceac0fc29e13652b4bd1fb8a23ba40bc93d9433b65536c53a1f63d187 |
Hashes for pixell-0.20.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7268880cdbe00852d1d6e62466ec0764f9386390b39032d192b84d3ba7875648 |
|
MD5 | 3d0eb654099737f144eb9e11bfba6de5 |
|
BLAKE2b-256 | d977f157c9bab87f9cd6089941393e6e832ad5d3aebf983f06011ee3c0be318e |
Hashes for pixell-0.20.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fb38726f23cb41487fad53b7fec7c18a7544846571218fbe12af2124774abad |
|
MD5 | e3fe80683cd4f186f6dc187941ec51f5 |
|
BLAKE2b-256 | c3e9f39619ac28c7143bb5ad0d28e31cbeafe46ee8382a4e91d1da67d1edcd33 |
Hashes for pixell-0.20.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d28f90d74be9189a4c93e9f02f5a306f2610cd02d24bfcb5ceb7ad0b5ccaa80 |
|
MD5 | ed912fa2c8412f5e132ebbf8a1bf1586 |
|
BLAKE2b-256 | 7f867332479cba83c5be0ce05f33a6a0bc5cd98b2329d7f0812c7b1f32e34896 |
Hashes for pixell-0.20.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c4708c0d4136c5bfb22b1b8fdb488a8855e67310300e824c2eaffa9941f3d14 |
|
MD5 | 09a52ffa05890eda3cc79480445cf9fe |
|
BLAKE2b-256 | 4b4ed561de7770eada80387a7ba99e9dffd0fd8c614e3ad51af83b70fc333853 |