https://github.com/simonsobs/pixell

A rectangular pixel map manipulation and harmonic analysis library derived from Sigurd Naess' enlib.

https://github.com/simonsobs/pixell

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    4 of 18 committers (22.2%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.0%) to scientific vocabulary

Keywords

astrophysics cosmology image-processing

Keywords from Contributors

mpi
Last synced: 5 months ago · JSON representation

Repository

A rectangular pixel map manipulation and harmonic analysis library derived from Sigurd Naess' enlib.

Basic Info
  • Host: GitHub
  • Owner: simonsobs
  • License: other
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 42.2 MB
Statistics
  • Stars: 51
  • Watchers: 23
  • Forks: 33
  • Open Issues: 32
  • Releases: 4
Topics
astrophysics cosmology image-processing
Created almost 8 years ago · Last pushed 8 months ago
Metadata Files
Readme Changelog Contributing License Authors

README.rst

=======
pixell
=======

.. image:: https://img.shields.io/github/actions/workflow/status/simonsobs/pixell/build.yml?branch=master
           :target: https://github.com/simonsobs/pixell/actions?query=workflow%3ABuild

.. image:: https://readthedocs.org/projects/pixell/badge/?version=latest
           :target: https://pixell.readthedocs.io/en/latest/?badge=latest
		   :alt: Documentation Status

.. image:: https://codecov.io/gh/simonsobs/pixell/branch/master/graph/badge.svg?token=DOIG32B6NT
	   :target: https://codecov.io/gh/simonsobs/pixell

.. image:: https://badge.fury.io/py/pixell.svg
		       :target: https://badge.fury.io/py/pixell

``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). 


* Free software: BSD license
* Documentation: https://pixell.readthedocs.io.
* Tutorials_
* Summary_ of what pixell can and cannot do

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:

.. code-block:: console

   $ benchmark-pixell-runner

Installing
----------

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

.. code-block:: console
		
   $ 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):

.. code-block:: console
   
   $ 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_.
  
.. _ducc0: https://pypi.org/project/ducc0/
.. _Tutorials: https://github.com/simonsobs/pixell_tutorials/
.. _Contributing: https://pixell.readthedocs.io/en/latest/contributing.html
.. _NERSC: https://pixell.readthedocs.io/en/latest/nersc.html
.. _MACOSX: https://github.com/simonsobs/pspy/blob/master/INSTALL_MACOS.rst
.. _Summary: https://docs.google.com/presentation/d/1wFQKJ8SGh6yizkcinx72eWeoLJyMpoPTuHgOTjGJD6I/edit?usp=sharing

Owner

  • Name: Simons Observatory
  • Login: simonsobs
  • Kind: organization

GitHub Events

Total
  • Create event: 25
  • Commit comment event: 1
  • Issues event: 15
  • Watch event: 9
  • Delete event: 8
  • Issue comment event: 51
  • Push event: 61
  • Pull request review comment event: 8
  • Pull request review event: 18
  • Pull request event: 34
  • Fork event: 3
Last Year
  • Create event: 25
  • Commit comment event: 1
  • Issues event: 15
  • Watch event: 9
  • Delete event: 8
  • Issue comment event: 51
  • Push event: 61
  • Pull request review comment event: 8
  • Pull request review event: 18
  • Pull request event: 34
  • Fork event: 3

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 850
  • Total Committers: 18
  • Avg Commits per committer: 47.222
  • Development Distribution Score (DDS): 0.522
Past Year
  • Commits: 133
  • Committers: 9
  • Avg Commits per committer: 14.778
  • Development Distribution Score (DDS): 0.534
Top Committers
Name Email Commits
Sigurd Kirkevold Næss s****n@a****o 406
Mathew Madhavacheril m****c@g****m 331
Josh Borrow j****h@j****m 61
Matthew Hasselfield m****f 26
AdriJD a****n@g****m 7
ajvanengelen e****n@c****a 3
Xavier Garrido x****o@g****m 3
Matt Hilton m****l@g****m 2
Zach Atkins 4****2 2
Sigurd K Naess s****n@l****v 1
Sigurd Naess s****n@l****g 1
Zack Li zq@p****u 1
Bai-Chiang g****b@q****m 1
Carlos Hervias a****c@g****m 1
Ioannis Paraskevakos i****k@p****u 1
Kolen Cheung i****c 1
Simon Foreman 1****n 1
alaposta 6****a 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 73
  • Total pull requests: 139
  • Average time to close issues: 11 months
  • Average time to close pull requests: 24 days
  • Total issue authors: 26
  • Total pull request authors: 15
  • Average comments per issue: 1.92
  • Average comments per pull request: 1.5
  • Merged pull requests: 116
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 15
  • Pull requests: 40
  • Average time to close issues: 26 days
  • Average time to close pull requests: 7 days
  • Issue authors: 10
  • Pull request authors: 9
  • Average comments per issue: 0.8
  • Average comments per pull request: 1.65
  • Merged pull requests: 27
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • msyriac (27)
  • zatkins2 (8)
  • mhasself (5)
  • zonca (5)
  • thibautlouis (4)
  • damonge (2)
  • ajvanengelen (2)
  • xgarrido (2)
  • axf295 (2)
  • ykyohei (1)
  • olakusiak (1)
  • AdriJD (1)
  • chinoney (1)
  • nicolas-graves (1)
  • amaurea (1)
Pull Request Authors
  • amaurea (53)
  • msyriac (49)
  • JBorrow (15)
  • iparask (9)
  • mhasself (7)
  • zatkins2 (6)
  • xgarrido (5)
  • xzackli (2)
  • ickc (2)
  • Bai-Chiang (2)
  • chervias (2)
  • adrien-laposta (1)
  • sjforeman (1)
  • ajvanengelen (1)
  • AdriJD (1)
Top Labels
Issue Labels
bug (9) documentation (6) enhancement (5) good first issue (2) help wanted (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 4,212 last-month
  • Total docker downloads: 22
  • Total dependent packages: 6
  • Total dependent repositories: 8
  • Total versions: 72
  • Total maintainers: 3
pypi.org: pixell

A rectangular pixel map manipulation and harmonic analysis library derived from Sigurd Naess' enlib.

  • Documentation: https://pixell.readthedocs.io/
  • License: BSD License Copyright (c) 2018-2021, Members of the Simons Observatory Collaboration All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  • Latest release: 0.29.0
    published 8 months ago
  • Versions: 72
  • Dependent Packages: 6
  • Dependent Repositories: 8
  • Downloads: 4,212 Last month
  • Docker Downloads: 22
Rankings
Dependent packages count: 1.6%
Docker downloads count: 3.7%
Downloads: 4.1%
Dependent repos count: 5.2%
Average: 5.5%
Forks count: 7.2%
Stargazers count: 11.1%
Maintainers (3)
Last synced: 6 months ago

Dependencies

docs/requirements.txt pypi
  • numpy *
.github/workflows/build.yml actions
  • actions/checkout v1 composite
  • actions/checkout v2 composite
  • actions/download-artifact v2 composite
  • actions/setup-python v1 composite
  • actions/setup-python v2 composite
  • actions/upload-artifact v2 composite
  • codecov/codecov-action v2 composite
  • pypa/gh-action-pypi-publish master composite
setup.py pypi