GithubHelp home page GithubHelp logo

marcocamma / pyfai Goto Github PK

View Code? Open in Web Editor NEW

This project forked from silx-kit/pyfai

0.0 2.0 0.0 286.53 MB

Fast Azimuthal Integration in Python

License: Other

Jupyter Notebook 40.46% Shell 0.15% Python 46.95% PowerShell 0.13% Batchfile 0.04% Makefile 1.15% Cython 7.26% C 3.85% Common Lisp 0.01%

pyfai's Introduction

pyFAI: Fast Azimuthal Integration in Python

Main development website: https://github.com/silx-kit/pyFAI

Build Status Appveyor Status myBinder Launcher Documentation Status Zenodo DOI

PyFAI is an azimuthal integration library that tries to be fast (as fast as C and even more using OpenCL and GPU). It is based on histogramming of the 2theta/Q positions of each (center of) pixel weighted by the intensity of each pixel, but parallel version uses a SparseMatrix-DenseVector multiplication. Neighboring output bins get also a contribution of pixels next to the border thanks to pixel splitting. Finally pyFAI provides also tools to calibrate the experimental setup using Debye-Scherrer rings of a reference compound.

References

Installation

With PIP

As most Python packages, pyFAI is available via PIP:

pip install pyFAI[gui]

It is advised to run this in a vitural environment. Provide the --user to perform an installation local to your user (not recommended). Under UNIX, you may have to run the command via sudo to gain root access an perform a system wide installation (neither recommended).

With conda

pyFAI is also available via conda:

conda install pyfai -c conda-forge

To install conda please see either conda or Anaconda.

From source code

The latest release of pyFAI can be downloaded from Github. Presently the source code has been distributed as a zip package. Download it one and unpack it:

unzip pyFAI-master.zip

As developement is also done on Github, development branch is also available

All files are unpacked into the directory pyFAI-master:

cd pyFAI-master

Build it & test it:

python3 setup.py build -j 4
python3 run_tests.py

For its tests, pyFAI downloads test images from the internet. Depending on your network connection and your local network configuration, you may have to setup a proxy configuration like this (no more needed at ESRF):

export http_proxy=http://proxy.site.org:3128

Finally, install pyFAI in the virtualenv after testing it:

python3 setup.py bdist_wheel
pip install --upgrade .

The newest development version can also be obtained by checking out from the git repository:

git clone https://github.com/silx-kit/pyFAI.git
cd pyFAI
pip install --upgrade .

If you want pyFAI to make use of your graphic card, please install pyopencl

If you are using MS Windows you can also download a binary version packaged as executable installation files (choose the one corresponding to your python version).

For MacOSX users with MacOS version>10.7, the default compiler switched from gcc to clang and dropped the OpenMP support. Please refer to the installation documentation ...

Documentation

Documentation can be build using this command and Sphinx (installed on your computer):

python3 setup.py build build_doc

Dependencies

Python 3.6, ... 3.10 are well tested and officially supported. For full functionality of pyFAI the following modules need to be installed.

Those dependencies can simply be installed by:

pip install -r requirements.txt

Ubuntu and Debian-like Linux distributions

To use pyFAI on Ubuntu/Debian the needed python modules can be installed either through the Synaptic Package Manager (found in System -> Administration) or using apt-get on from the command line in a terminal:

sudo apt-get install pyfai

The extra Ubuntu packages needed are:

  • python3-numpy
  • python3-scipy
  • python3-matplotlib
  • python3-dev
  • python3-fabio
  • python3-pyopencl
  • python3-pyqt5
  • python3-silx
  • python3-numexpr

using apt-get these can be installed as:

sudo apt-get build-dep pyfai

MacOSX

One needs to install Python (>=3.6) and Xcode prior to start installing pyFAI. The compiled extension will use only one core due to the limitation of the compiler. OpenCL is hence greately adviced on Apple systems. Then install the missing dependencies with pip:

pip install -r requirements.txt

Windows

Under Windows, one needs to install Python (>=3.6) and the Visual Studio C++ compiler. Then install the missing dependencies with pip:

pip install  -r requirements.txt

Getting help

A mailing-list, [email protected], is available to get help on the program and how to use it. One needs to subscribe by sending an email to [email protected] with a subject "subscribe pyfai".

Maintainers

  • Jérôme Kieffer (ESRF)

Contributors

  • Valentin Valls (ESRF)
  • Frédéric-Emmanuel Picca (Soleil)
  • Thomas Vincent (ESRF)
  • Dimitris Karkoulis (ESRF)
  • Aurore Deschildre (ESRF)
  • Giannis Ashiotis (ESRF)
  • Zubair Nawaz (Sesame)
  • Jon Wright (ESRF)
  • Amund Hov (ESRF)
  • Dodogerstlin @github
  • Gunthard Benecke (Desy)
  • Gero Flucke (Desy)

Indirect contributors (ideas...)

  • Peter Boesecke
  • Manuel Sánchez del Río
  • Vicente Armando Solé
  • Brian Pauw
  • Veijo Honkimaki

pyfai's People

Contributors

kif avatar vallsv avatar deschila avatar t20100 avatar picca avatar payno avatar jonwright avatar ronpandolfi avatar loichuder avatar giannisa avatar dodogerstlin avatar pre-commit-ci[bot] avatar bertrand-faure avatar cj-wright avatar woutdenolf avatar jbhopkins avatar gbenecke avatar dependabot[bot] avatar elena-pascal avatar weninc avatar ericpre avatar flucke avatar jangarrevoet avatar slyon avatar malte-storm avatar mwhudson avatar phlpphns avatar rtellez700 avatar sigmundneher avatar tacaswell avatar

Watchers

James Cloos avatar marco cammarata avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.