Skip to content

Commit f6e9516

Browse files
committed
Merge branch 'develop'
2 parents 84270ec + b18b1a2 commit f6e9516

37 files changed

+10508
-4599
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@ __pycache__/
1414
/xrdfit/test.py
1515
/xrdfit.egg-info
1616
/example_data/example_data_large/
17+
/build
18+
/dist

CONTRIBUTING.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Contributing
2+
3+
We welcome bug reports, feature requests and suggestions for improvement made to this package. Below are some guidelines to keep in mind when requesting or making changes.
4+
5+
## Reporting Issues
6+
7+
If you encounter a problem with the code, please open an issue on the project's GitHub issue board: https://github.com/LightForm-group/xrdfit/issues
8+
9+
You should include details about what version of ``xrdfit`` you are using, what you are attempting to do, details of the error you encountered and if possible a [minimal working example](https://en.wikipedia.org/wiki/Minimal_working_example) that shows the problem.
10+
11+
## Coding style
12+
13+
This project uses the PEP8 standard for formatting Python code with the exception that the maximum line length is 120 characters.
14+
15+
Docstrings are formatted in the reStructuredText format. These are automatically harvested by the Sphinx autodoc extension and form the API documentation at Read The Docs: (https://xrdfit.readthedocs.io/en/latest/)
16+
17+
## Release guidelines
18+
19+
Releases follow the [semver](https://semver.org/) numbering scheme.
20+
21+
When releasing a new version the following need to be updated:
22+
* Update version number in setup.py
23+
* Update version number in docs/config.py
24+
* Add tag to git repo of the version number prefixed by the letter “v”
25+
* Draft release on GitHub for that tag with a list of changes since the last version
26+
* Upload new version to PyPi

README.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,45 @@
1+
[![PyPI version](https://badge.fury.io/py/xrdfit.svg)](https://badge.fury.io/py/xrdfit)
2+
[![Documentation Status](https://readthedocs.org/projects/xrdfit/badge/?version=latest)](https://xrdfit.readthedocs.io/en/latest/?badge=latest)
3+
[![DOI](https://zenodo.org/badge/203145007.svg)](https://zenodo.org/badge/latestdoi/203145007)
4+
5+
Introduction
6+
--------------
7+
8+
xrdfit is a Python module for fitting the peaks found in shallow x-ray diffraction spectra. It is designed to be an easy to use tool for quick analysis of spectra. Features are included for automating fitting over many spectra to enable tracking of peaks as they shift through the experiment. xrdfit uses the Python module lmfit for the underlying fitting. xrdfit is designed to be accessible for all researchers who need to process SXRD spectra and so does not require a detailed knowledge of programming or fitting.
9+
110
Installation
211
-------------
312

413
To install as a Python module, type
514

6-
`python -m pip install .`
15+
`python -m pip install xrdfit`
716

817
from the root directory.
918
For developers, you should install in linked .egg mode using
1019

1120
`python -m pip install -e .`
1221

13-
If you are using a Python virtual environment, you should activate this first before using the above commands.
22+
If you are using a Python virtual environment, you should activate this first before using the above commands.
23+
24+
Documentation
25+
---------------
26+
Documentation including an API reference is provided at: https://xrdfit.readthedocs.io/en/latest/
27+
28+
The majority of the documentation is provided as example driven interactive Jupyter notebooks. These are included along with the source code in the "tutorial notebooks" folder.
29+
If this package was downloaded from pip, the source can be found on GitHub: https://github.com/LightForm-group/xrdfit
30+
31+
32+
Required libraries
33+
--------------------
34+
35+
This module uses the Python libraries:
36+
* NumPy (https://numpy.org/)
37+
* matplotlib (https://matplotlib.org/)
38+
* pandas (https://pandas.pydata.org/)
39+
* dill (https://pypi.org/project/dill/)
40+
* tqdm (https://tqdm.github.io/)
41+
* SciPy (https://www.scipy.org/)
42+
* lmfit (https://lmfit.github.io/lmfit-py/)
43+
44+
The following libraries are required to use the tutorial documentation workbooks:
45+
* Jupyter (https://jupyter.org/)

docs/Makefile

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/source/conf.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
# -- Project information -----------------------------------------------------
1919

2020
project = 'xrdfit'
21-
copyright = '2019, Peter Crowther'
22-
author = 'Peter Crowther'
21+
copyright = '2019, Peter Crowther and Christopher Daniel'
22+
author = 'Peter Crowther and Christopher Daniel'
2323

2424
# The full version, including alpha/beta/rc tags
25-
release = '0.1'
25+
release = '0.1.1'
2626

2727

2828
# -- General configuration ---------------------------------------------------
@@ -66,4 +66,7 @@
6666
# Add any paths that contain custom static files (such as style sheets) here,
6767
# relative to this directory. They are copied after the builtin static files,
6868
# so a file named "default.css" will overwrite the builtin "default.css".
69-
html_static_path = ['_static']
69+
html_static_path = ['_static']
70+
71+
# -- Autodoc options --------------------
72+
autoclass_content = 'both'

docs/source/index.rst

Lines changed: 46 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,53 @@
1-
.. xrdfit documentation master file, created by
2-
sphinx-quickstart on Mon Dec 16 15:47:29 2019.
3-
You can adapt this file completely to your liking, but it should at least
4-
contain the root `toctree` directive.
1+
xrdfit documentation
2+
======================
53

6-
Welcome to xrdfit's documentation!
7-
==================================
4+
``xrdfit`` is a Python package for fitting the diffraction peaks in synchrotron X-ray diffraction (SXRD) and XRD spectra. It is intended as an easy to use tool for the quick analysis of individual and overlapping lattice plane peaks, to quantify the peak positions and profiles. ``xrdfit`` uses the Python package `lmfit <https://lmfit.github.io/lmfit-py/>`_ for the underlying fitting. Features are included for selecting different 'cakes' of data and automating fitting over many spectra, to enable tracking of peaks as they shift throughout the experiment. ``xrdfit`` is designed to be used by experimental researchers who need to process SXRD spectra but do not have a detailed knowledge of programming or fitting.
5+
6+
7+
Installation
8+
==============
9+
10+
``xrdfit`` is compatible with Python 3.6+.
11+
12+
Use :command:`pip` to install the latest stable version of ``xrdfit``:
13+
14+
.. code-block:: console
15+
16+
pip install xrdfit
17+
18+
The current development version is available on `github
19+
<https://github.com/LightForm-group/xrdfit>`__. To install use:
20+
21+
.. code-block:: console
22+
23+
git clone --branch develop https://github.com/LightForm-group/xrdfit
24+
cd xrdfit
25+
python -m pip install .
826
9-
.. toctree::
10-
:maxdepth: 2
11-
:caption: Contents:
1227
28+
Getting started
29+
================
1330

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

15-
Indices and tables
16-
==================
33+
The primary source of documentation for new users is a series of tutorial Jupyter Notebooks which are included with the source code.
34+
35+
The source and notebooks are available on the project’s GitHub page: `<https://github.com/LightForm-group/xrdfit>`_
36+
37+
38+
Acknowledgements
39+
=================
40+
41+
This project was developed at the `University of Manchester <https://www.manchester.ac.uk/>`_ with funding from the UK's Engineering and Physical Sciences Research Council (EPSRC) `LightForm <https://lightform.org.uk/>`_ grant: `(EP/R001715/1) <https://gow.epsrc.ukri.org/NGBOViewGrant.aspx?GrantRef=EP/R001715/1>`_.
42+
43+
44+
API Reference
45+
===============
46+
47+
.. toctree::
48+
:maxdepth: 3
49+
50+
modules
1751

1852
* :ref:`genindex`
19-
* :ref:`modindex`
20-
* :ref:`search`
53+

docs/source/xrdfit.rst

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
11
xrdfit package
22
==============
33

4-
Submodules
5-
----------
6-
7-
xrdfit.fit\_analysis module
8-
---------------------------
9-
10-
.. automodule:: xrdfit.fit_analysis
11-
:members:
12-
:undoc-members:
13-
:show-inheritance:
14-
154
xrdfit.plotting module
165
----------------------
176

@@ -34,13 +23,4 @@ xrdfit.spectrum\_fitting module
3423
.. automodule:: xrdfit.spectrum_fitting
3524
:members:
3625
:undoc-members:
37-
:show-inheritance:
38-
39-
40-
Module contents
41-
---------------
42-
43-
.. automodule:: xrdfit
44-
:members:
45-
:undoc-members:
46-
:show-inheritance:
26+
:show-inheritance:

0 commit comments

Comments
 (0)