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 libsharp) of such maps and tools for visualization (through the Python Image Library).
Free software: BSD license
Documentation: https://pixell.readthedocs.io.
Dependencies
Python>=3.6
gcc/gfortran or Intel compilers (clang might not work out of the box)
libsharp (downloaded and installed)
automake (for libsharp compilation)
healpy, Cython, astropy, numpy, scipy, matplotlib, pyyaml, h5py, Pillow (Python Image Library)
Installing
For installation instructions specific to NERSC/cori, see NERSC.
For installation instructions specific to MacOS X, see MACOSX (h/t Thibaut Louis).
For all other, below are general instructions.
To install, clone this repository and run:
$ python setup.py install --user
To test the installation, you can run:
$ python setup.py test
You may need to install pytest for the above to work (with pip install pytest –user).
Existing libsharp installation (optional)
Libsharp is installed automatically by setup.py. The installation script will attempt to automatically git clone the latest version and compile it. If instead you want to use an existing libsharp installation, you can do so by symlinking the libsharp directory into a directory called _deps in the root directory, such that pixell/_deps/libsharp/libsharp/sharp.h exists. If you’re convinced that the libsharp library is successfully compiled, add an empty file named pixell/_deps/libsharp/libsharp/success.txt to ensure pixell’s setup.py knows of your existing installation.
Intel compilers
Intel compilers might require a two step installation as follows
$ python setup.py build_ext -i --fcompiler=intelem --compiler=intelem
$ python setup.py install --user
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
$ python setup.py install --user
Development workflow (recommended)
If you are a developer, run:
$ python setup.py build_ext -i
$ py.test
and add the cloned directory to your Python path so that changes you make in any python file are immediately reflected. e.g., in your .bashrc file,
export PYTHONPATH=$PYTHONPATH:/path/to/cloned/pixell/directory
If you also need non-Python code to be recompiled, run:
$ python setup.py clean
before the above steps.
To test the installation under development mode, you can run:
$ py.test
This requires the pytest Python package to be installed.
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.1.0 (2018-06-15)
First release on PyPI.
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.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.9.5 (2020-06-20)
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
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 Distributions
Built Distributions
Hashes for pixell-0.9.5-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f97e03cde2f7b6b8ddbdb2cf509a41455a001934fa3b002dac8b05ec4e2d72c8 |
|
MD5 | 13bf6192357f7c6aa7d3f920ab450ec9 |
|
BLAKE2b-256 | cd21600b31eb7ee7eb1cd007ce6b4bd3ebc34c24dc2482534c31f108dfac7df3 |
Hashes for pixell-0.9.5-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a33973162cd53680816b6f2e432a3f69cacfdb0e06486f34d0bf73b454c32208 |
|
MD5 | 0caab7e6146690b96e82ac41c7d6d4b2 |
|
BLAKE2b-256 | 9e360d5fec057f81c37f2f78e0acedce125beefd39727f5cb0ffe1750a4273f1 |
Hashes for pixell-0.9.5-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8607f9f106c99137a665bc43225d0bcab982229ddf191d93b3e54648f26364e |
|
MD5 | 3a44e0cfd909ee97db5a4087860b340e |
|
BLAKE2b-256 | 0f5d4f851deb229fa02a26e1cee03771723bb11703029612cb757931b8059483 |
Hashes for pixell-0.9.5-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6c6d74836a98beb37c5975e1297b84496969dde174466017153d03d677746ec |
|
MD5 | da4f7d2e51ecb220cf61969387a8e877 |
|
BLAKE2b-256 | 12832e98402b7c79986f8de896e81a51d10e3b97ad62f65c588f1723ee0bcb74 |
Hashes for pixell-0.9.5-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 095a08a5a962f2e3626e1eb49bdfd11beae6fac8d6c88efb80b6310651bafc85 |
|
MD5 | 8770ad1389ec636b15465e1506c35b66 |
|
BLAKE2b-256 | 98ea75e7600fd57ff13c4b9d328e531c72939642be626af3182700102ce4da0e |
Hashes for pixell-0.9.5-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ac573662f47918b3fade77aac9922136576050ce5c73a7132aba2ff54bdd834 |
|
MD5 | 4af36be4489eef4a2d053b1bd805ae55 |
|
BLAKE2b-256 | a321d2c9c70f5524165e7e450195689993e8e65c9282dae8e8a135bbf2fccd14 |