Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
merrygoat committed Aug 12, 2020
2 parents edce593 + 67c4ea4 commit be9897a
Show file tree
Hide file tree
Showing 12 changed files with 2,030 additions and 1,701 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/test_notebooks.yaml
@@ -0,0 +1,9 @@
on: push
jobs:
run:
runs-on: ubuntu-latest
name: Run treebeard
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: treebeardtech/treebeard@master
1 change: 1 addition & 0 deletions .gitignore
@@ -1,5 +1,6 @@
._.DS_Store
._*
.DS*
__pycache__/
.ipynb_checkpoints/
*.fuse
Expand Down
24 changes: 13 additions & 11 deletions README.md
Expand Up @@ -2,6 +2,7 @@
[![Documentation Status](https://readthedocs.org/projects/xrdfit/badge/?version=latest)](https://xrdfit.readthedocs.io/en/latest/?badge=latest)
[![DOI](https://zenodo.org/badge/203145007.svg)](https://zenodo.org/badge/latestdoi/203145007)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/LightForm-group/xrdfit/v1.0.0?filepath=%2Ftutorial%20notebooks)
![.github/workflows/test_notebooks.yaml](https://github.com/LightForm-group/xrdfit/workflows/.github/workflows/test_notebooks.yaml/badge.svg)

Introduction
--------------
Expand Down Expand Up @@ -32,27 +33,28 @@ If this package was downloaded from pip, the source can be found on GitHub: http
Try it out
-------------

You can try out `xrdfit` directly in your browser with Binder: https://mybinder.org/v2/gh/LightForm-group/xrdfit/v1.0.0?filepath=%2Ftutorial%20notebooks
Note that `Tutorial Notebook 4` will not run correctly in Binder as it requires the download of a supplementary dataset (https://zenodo.org/record/3630511#.XjHhJGj7SUl) which is not included in the source repository due to its size.
You can try out `xrdfit` directly in your browser with Binder by clicking [here](https://mybinder.org/v2/gh/LightForm-group/xrdfit/master).

Note that `Tutorial Notebook 4` will not run correctly in Binder as it requires the download of a [supplementary dataset](https://zenodo.org/record/3630511#.XjHhJGj7SUl) which is not included in the source repository due to its size.

Compatibility
--------------

The code was developed and tested with Python version 3.8. The minimum required Python version is 3.6. If you install the dependencies of xrdfit using the
specification in requirements.txt, this will use the same package versions used by the developers. While this is good for reproducibility, it is worth noting that
if you are using a newer Python version > 3.8, some of these packages may not have binary wheels for your version and may require compilation.
if you are using a newer Python version (> 3.8), some of these packages may not have binary wheels for your version and may require compilation.

Required libraries
--------------------

This module uses the Python libraries:
* NumPy (https://numpy.org/)
* matplotlib (https://matplotlib.org/)
* pandas (https://pandas.pydata.org/)
* dill (https://pypi.org/project/dill/)
* tqdm (https://tqdm.github.io/)
* SciPy (https://www.scipy.org/)
* lmfit (https://lmfit.github.io/lmfit-py/)
* [NumPy](https://numpy.org/)
* [matplotlib](https://matplotlib.org/)
* [pandas](https://pandas.pydata.org/)
* [dill](https://pypi.org/project/dill/)
* [tqdm ](https://tqdm.github.io/)
* [SciPy](https://www.scipy.org/)
* [lmfit](https://lmfit.github.io/lmfit-py/)

The following libraries are required to use the tutorial documentation workbooks:
* Jupyter (https://jupyter.org/)
* [Jupyter](https://jupyter.org/)
45 changes: 42 additions & 3 deletions docs/source/index.rst
Expand Up @@ -26,13 +26,52 @@ The current development version is available on `github
Getting started
================
==================

This documentation is primarily an API reference, auto-generated from the docstrings in the source code.

The primary source of documentation for new users is a series of tutorial Jupyter Notebooks which are included with the source code.
The primary source of documentation for new users is a series of tutorial Jupyter Notebooks which are included with
the source code. You can check out the tutorial notebooks online in your browser at `Binder <https://mybinder.org/v2/gh/LightForm-group/xrdfit/master>`_.

The source and notebooks are available on the project’s GitHub page: `<https://github.com/LightForm-group/xrdfit>`_
Testing
========

The code does not contain formal tests but almost all of the features are covered in the tutorial notebooks. If you can run
these then you have installed xrdfit successfully!

The source and tutorial notebooks are available on the `xrdfit` `GitHub page <https://github.com/LightForm-group/xrdfit>`_.


Comparison to other peak fitting tools
========================================

DAWN
-----

`DAWN <https://dawnsci.org/>`_ is a multipurpose framework, developed to deal with analysis of a whole range of
datasets measured from beamline experiments. It is the most comparable tool we have come across in terms of its
ability to do simple fits like those done by `xrdfit`.

Testing the fitting of a clear single peak for a dataset of 1000 spectra we find that DAWN typically takes 1-2 seconds
per image and provides only limited information about the result of the fit as an output. DAWN only appears to allow
fitting of a single peak at a time, fitting multiple peaks could mean running the same analysis each time for each
peak. The automation of fitting in DAWN depends on identifying peak bounds using a point and click method within a
GUI, which can't be used as part of a reproducible analysis. We also found that the program crashed when attempting
to load more than 1000 spectra for analysis.

For `xrdfit`, fitting of the same peak is much faster, on the order of 0.05 seconds per spectra. It is also possible
to set up an analysis to fit multiple peaks simultaneously which greatly speeds the analysis of a full spectrum.
Fitting is much more interactive, meaning that it is possible to more quickly review the fits and modify them if
necessary. `xrdfit` can also easily deal with large datasets, containing many thousands of patterns.

MAUD
-----

`MAUD <http://maud.radiographema.eu>`_ can be used to fit peaks in diffraction spectra but uses a Rietveld refinement
method to match a model of the beamline setup and material properties to the data. This method is extremely useful for
calculating different material properties, such as the crystallographic texture. However, because MAUD uses a model of
the unit cell to fit the data, there is some averaging of the overall fit and a larger error in the individual peak
position and intensity.


Acknowledgements
Expand Down

0 comments on commit be9897a

Please sign in to comment.