carnisj / bcdi

BCDI: tools for pre(post)-processing Bragg coherent X-ray diffraction imaging data
Other
23 stars 17 forks source link

.. image:: https://readthedocs.org/projects/bcdi/badge/?version=latest :target: https://bcdi.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status .. image:: https://img.shields.io/github/actions/workflow/status/carnisj/bcdi/pr_lint_test.yml?logo=GitHub :alt: GitHub Workflow Status .. image:: https://deepsource.io/gh/carnisj/bcdi.svg/?label=active+issues&show_trend=true&token=N3Z0cklmQrG8kzZOVwGJhLd9 .. image:: https://img.shields.io/pypi/pyversions/bcdi?logo=PyPI&logoColor=%23FFFF00 :alt: PyPI - Python Version .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3257616.svg :target: https://doi.org/10.5281/zenodo.3257616

BCDI: tools for pre(post)-processing Bragg and forward coherent X-ray diffraction imaging data

Introduction

BCDI stands for Bragg coherent X-ray diffraction imaging. It can be used for:

Considering that most parts of the analysis pipeline are actually beamline-independent, we tried to reuse as much as possible code, and leverage inheritance when it comes to facility or beamline-dependent details.

BCDI as a python toolkit

BCDI can be used as a python library with the following main modules:

1) :mod:bcdi.algorithms: PSF and image deconvolution using Richardson-Lucy algorithm

2) :mod:bcdi.experiment: definition of the experimental geometry (beamline, setup, detector, diffractometer...).

3) :mod:bcdi.graph : generation of plots using predefined templates.

4) :mod:bcdi.postprocessing: methods for post-processing the complex output of a phasing algorithm. Stereographic projection of a diffraction peak or a reconstructed crystal. Automatic detection of reconstructed facets and statistics on facet strain.

5) :mod:bcdi.preprocessing: methods for pre-processing the diffraction intensity in Bragg CDI or forward CDI geometry.

6) :mod:bcdi.simulation: in BCDI geometry, calculation of the diffraction intensity based on FFT or kinematical sum. It can include a displacement field, noise, detector gaps etc... In forward CDI geometry, calculation of the Bragg peak positions in 3D for a mesocrystal, knowing the unit cell and unit cell parameter.

7) :mod:bcdi.utils: generic functions about data loading, fitting functions, cropping/ padding, image registration, validation functions ...

8) :mod:bcdi.xcca: X-ray cross-correlation analysis related methods

The central module is :mod:bcdi.experiment, which contains all setup-related implementation. This is the place where to look at if you want to add support for a new beamline or detector.

Acknowledgment and third party packages

We would like to acknowledge the following packages:

The following third-party packages are required:

Download & Installation

BCDI is available from:

| - to install the main branch, type: | python -m pip install git+https://github.com/carnisj/bcdi.git | - to install a specific branch, type: | python -m pip install git+https://github.com/carnisj/bcdi.git@branch_name

Add the flag --upgrade to the commands above in order to update an existing installation.

Note that there are issues with installing scikit-image within an Anaconda environment. In such situation, the workaround is to create instead a virtual environment using pip.

If you want to contribute to bcdi development, install also extra dependencies: python -m pip install bcdi[dev]

Please send feedback in GitHub issues <https://github.com/carnisj/bcdi/issues>_.

Documentation

The documentation is available at: https://bcdi.readthedocs.io/en/latest/

Video Documentation

All talks from the bcdiHackweek 2021 are available at the following links:

Related package Cohere <https://github.com/AdvancedPhotonSource/cohere>_:

License

The BCDI library is distributed with a CeCILL-B license (an open-source license similar to the FreeBSD one). See http://cecill.info/licences/Licence_CeCILL-B_V1-en.html

Citation & Bibliography

If you use this package for scientific work, please consider including a citation using the following DOI: 10.5281/zenodo.3257616

This package contributed to the following peer-reviewed publications: