Metadata-Version: 2.1
Name: dynamic-diffraction-module
Version: 0.1.3
Summary: A python based framework for dynamic diffraction calculations of crystals.
Home-page: https://gitlab.desy.de/patrick.rauer/dynamic-diffraction-module
License: GPL-3.0-or-later
Author: Patrick Rauer
Author-email: patrick.rauer@desy.de
Requires-Python: >=3.8,<4.0
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: matplotlib (>=3.6.1,<4.0.0)
Requires-Dist: numpy (>=1.23.2,<2.0.0)
Requires-Dist: pandas (>=2.0,<3.0)
Requires-Dist: scipy (>=1.8,<2.0)
Requires-Dist: xraylib (>=4.0.1,<5.0.0)
Description-Content-Type: text/markdown

# Dynamic Diffraction Module

[![pypi](https://img.shields.io/pypi/v/dynamic-diffraction-module.svg)](https://pypi.org/project/dynamic-diffraction-module/)
[![python](https://img.shields.io/pypi/pyversions/dynamic-diffraction-module.svg)](https://pypi.org/project/dynamic-diffraction-module/)

A repository meant for (python based) functions on the dynamic diffraction theory. It is closely related to the Matlab written <https://gitlab.desy.de/patrick.rauer/MatlabDiffractionStuff>.
The structure, however, is based on the Dynamic Diffraction submodule of the [pXCP](https://gitlab.desy.de/patrick.rauer/Xgeno_mpi) framework.

* Documentation: <https://patrick.rauer.pages.desy.de/dynamic-diffraction-module>
* GitLab: <https://gitlab.desy.de/patrick.rauer/dynamic-diffraction-module>
* PyPI: <https://pypi.org/project/dynamic-diffraction-module/>

## Features

Currently, the scope of the package is rather rudimentary.
It includes:

* computing the (modified) Bragg energy for any given plane H for a specific micro- and macroscopic crystal orientation
* computing the (approximative) energy width for any given plane H for a specific micro- and macroscopic crystal orientation in the two beam approximation
* Selecting the number of reflecting planes in the vicinity of a given photon energy + crystal orientation configuration
* computing reflectivity/transmissivity vs energy for a specified crystal plane H0 can be computed in the two beam approximation
* Rocking curve scans in the two beam approximation
* diffraction at strained crystals (however, only symmetric close to backscattering for the moment)

However, further functionality is to follow soon:

* n-beam diffraction
* asymmetric, 3D diffraction at strained crystals
* ...

## External packages

* numpy (required)
* [xraylib](https://github.com/tschoonj/xraylib) (prospectively optional,currently required)
* matplotlib
* pandas

## Usage

There is no documentation for the API yet. However, you can find some tutorial *.ipynb scripts in the [playgrounds folder](https://gitlab.desy.de/patrick.rauer/dynamic-diffraction-module/-/tree/main/playgrounds/README.md) on [gitlab](https://gitlab.desy.de/patrick.rauer/dynamic-diffraction-module).

## LICENSE

* Free software: GNU GENERAL PUBLIC LICENSE Version 3

## Credits

This package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter) and the [waynerv/cookiecutter-pypackage](https://github.com/waynerv/cookiecutter-pypackage) project template.

