1+ |Icon | `diffpy.pdfmorph <https://diffpy.github.io/diffpy.pdfmorph >`_
2+ =========================================================
13
4+ .. |Icon | image :: https://avatars.githubusercontent.com/diffpy
5+ :target: https://diffpy.github.io/diffpy.pdfmorph
6+ :height: 100px
27
3- .. image :: https://github.com/diffpy/diffpy.pdfmorph/actions/workflows/main.yml/badge.svg
4- :target: https://github.com/diffpy/diffpy.pdfmorph/actions/workflows/main.yml
8+ |PyPi | |Forge | |PythonVersion | |PR |
59
6- .. image :: http://codecov.io/github/diffpy/diffpy.pdfmorph/coverage.svg?branch=master
7- :target: http://codecov.io/github/diffpy/diffpy.pdfmorph?branch=master
10+ |CI | |Codecov | |Black | |Tracking |
811
12+ .. |Black | image :: https://img.shields.io/badge/code_style-black-black
13+ :target: https://github.com/psf/black
914
10- PDFmorph
11- ========================================================================
15+ .. | CI | image :: https://github.com/diffpy/diffpy.pdfmorph/actions/workflows/main.yml/badge.svg
16+ :target: https://github.com/diffpy/diffpy.pdfmorph/actions/workflows/main.yml
1217
18+ .. |Codecov | image :: https://codecov.io/gh/diffpy/diffpy.pdfmorph/branch/main/graph/badge.svg
19+ :target: https://codecov.io/gh/diffpy/diffpy.pdfmorph
1320
14- PDFmorph is a Python software package designed to increase the insight
15- researchers can obtain from measured atomic pair distribution functions
16- (PDFs) in a model-independent way. The program was designed to help a
17- researcher answer the question: "Has my material undergone a phase
21+ .. |Forge | image :: https://img.shields.io/conda/vn/conda-forge/diffpy.pdfmorph
22+ :target: https://anaconda.org/conda-forge/diffpy.pdfmorph
23+
24+ .. |PR | image :: https://img.shields.io/badge/PR-Welcome-29ab47ff
25+
26+ .. |PyPi | image :: https://img.shields.io/pypi/v/diffpy.pdfmorph
27+ :target: https://pypi.org/project/diffpy.pdfmorph/
28+
29+ .. |PythonVersion | image :: https://img.shields.io/pypi/pyversions/diffpy.pdfmorph
30+ :target: https://pypi.org/project/diffpy.pdfmorph/
31+
32+ .. |Tracking | image :: https://img.shields.io/badge/issue_tracking-github-blue
33+ :target: https://github.com/diffpy/diffpy.pdfmorph/issues
34+
35+ Tools for manipulating and comparing PDF profiles
36+
37+ PDFmorph is a Python software package designed to increase the insight
38+ researchers can obtain from measured atomic pair distribution functions
39+ (PDFs) in a model-independent way. The program was designed to help a
40+ researcher answer the question: "Has my material undergone a phase
1841transition between these two measurements?"
1942
20- One approach is to compare the two PDFs in a plot and view the difference
21- curve underneath. However, significant signal can be seen in the
22- difference curve from benign effects such as thermal expansion (peak
23- shifts) and increased thermal motion (peak broadening) or a change in
24- scale due to differences in incident flux, for example. PDFmorph will
25- do its best to correct for these benign effects before computing and
43+ One approach is to compare the two PDFs in a plot and view the difference
44+ curve underneath. However, significant signal can be seen in the
45+ difference curve from benign effects such as thermal expansion (peak
46+ shifts) and increased thermal motion (peak broadening) or a change in
47+ scale due to differences in incident flux, for example. PDFmorph will
48+ do its best to correct for these benign effects before computing and
2649plotting the difference curve. One measured PDF (typically that collected
27- at higher temperature) is identified as the target PDF and the second
28- PDF is then morphed by "stretching" (changing the r-axis to simulate a
29- uniform lattice expansion), "smearing" (broadening peaks through a
30- uniform convolution to simulate increased thermal motion), and "scaling"
31- (self-explanatory). PDFmorph will vary the amplitude of the morphing
32- transformations to obtain the best fit between the morphed and the target
33- PDFs, then plot them on top of each other with the difference plotted
50+ at higher temperature) is identified as the target PDF and the second
51+ PDF is then morphed by "stretching" (changing the r-axis to simulate a
52+ uniform lattice expansion), "smearing" (broadening peaks through a
53+ uniform convolution to simulate increased thermal motion), and "scaling"
54+ (self-explanatory). PDFmorph will vary the amplitude of the morphing
55+ transformations to obtain the best fit between the morphed and the target
56+ PDFs, then plot them on top of each other with the difference plotted
3457below.
3558
3659There are also a few other morphing transformations in the program.
3760
38- Finally, we note that PDFmorph should work on other spectra that are not
61+ Finally, we note that PDFmorph should work on other spectra that are not
3962PDFs, though it has not been extensively tested beyond the PDF.
4063
4164
42- LICENSE
43- ------------------------------------------------------------------------
44-
45- This software is subject to license and copyright restrictions listed
46- `here. <https://github.com/diffpy/diffpy.pdfmorph/blob/master/LICENSE.txt/ >`_
65+ For more information about the diffpy.pdfmorph library, please consult our `online documentation <https://diffpy.github.io/diffpy.pdfmorph >`_.
4766
67+ Citation
68+ --------
4869
49- REQUIREMENTS
50- ------------------------------------------------------------------------
70+ If you use diffpy.pdfmorph in a scientific publication, we would like you to cite this package as
5171
52- PDFmorph is currently run from the command line, which requires opening
53- and typing into a terminal window or Windows command prompt. It is
54- recommended that you consult online resources and become somewhat
55- familiar before using PDFmorph.
72+ diffpy.pdfmorph Package, https://github.com/diffpy/diffpy.pdfmorph
5673
57- PDFmorph can be run with Python 3.10 or higher. It makes use of several third party
58- libraries that you'll need to run the app and its components.
74+ Installation
75+ ------------
5976
60- * `NumPy ` - library for scientific computing with Python
61- * `matplotlib ` - Python 2D plotting library
62- * `SciPy ` - library for highly technical Python computing
63- * `diffpy.utils ` - `shared helper utilities <https://github.com/diffpy/diffpy.utils/ >`_ for wx GUI
77+ The preferred method is to use `Miniconda Python
78+ <https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html> `_
79+ and install from the "conda-forge" channel of Conda packages.
6480
65- These dependencies will be installed automatically if you use the conda
66- installation procedure described below.
81+ To add "conda-forge" to the conda channels, run the following in a terminal. ::
6782
83+ conda config --add channels conda-forge
6884
69- INSTALLATION
70- ------------------------------------------------------------------------
85+ We want to install our packages in a suitable conda environment.
86+ The following creates and activates a new environment named `` diffpy.pdfmorph_env `` ::
7187
72- We recommend installing the software using conda. If you have anaconda
73- or mini-conda installed on your computer, you can proceed directly to
74- the instructions below. If not, we recommend that you install mini-
75- conda and test that it is working by opening a terminal and typing
76- ``conda ``.
77-
78- To create and activate a conda environment to use this software, run
79- the following command from the command line ::
80-
81- conda create -n pdfmorph_env python=3 --yes
82- conda activate pdfmorph_env
88+ conda create -n diffpy.pdfmorph_env python=3
89+ conda activate diffpy.pdfmorph_env
8390
84- When you are finished with the session, exit the environment by running ::
91+ Then, to fully install `` diffpy.pdfmorph `` in our active environment, run ::
8592
86- conda deactivate pdfmorph_env
93+ conda install diffpy.pdfmorph
8794
88- For your future sessions with the application: Make sure to run the
89- `` conda activate pdfmorph_env `` command from your command line beforehand
90- to ensure access to the software.
95+ Another option is to use `` pip `` to download and install the latest release from
96+ `Python Package Index < https://pypi.python.org >`_.
97+ To install using `` pip `` into your `` diffpy.pdfmorph_env `` environment, we will also have to install dependencies ::
9198
92- Once in your desired conda environment, you can install from either the
93- "conda-forge" channel of Anaconda packages by running ::
99+ pip install -r https://raw.githubusercontent.com/diffpy/diffpy.pdfmorph/main/requirements/run.txt
94100
95- conda config --add channels conda-forge
96- conda install diffpy.pdfmorph
97-
98- If you do not use conda or prefer to install from sources, please
99- consult online documentation.
101+ and then install the package ::
100102
101- With conda, PDFmorph can be later upgraded to the latest released
102- version using ::
103+ pip install diffpy.pdfmorph
103104
104- conda update diffpy.pdfmorph
105+ If you prefer to install from sources, after installing the dependencies, obtain the source archive from
106+ `GitHub <https://github.com/diffpy/diffpy.pdfmorph/ >`_. Once installed, ``cd `` into your ``diffpy.pdfmorph `` directory
107+ and run the following ::
105108
109+ pip install .
106110
107111USING PDFmorph
108112------------------------------------------------------------------------
@@ -117,36 +121,34 @@ up a terminal and check installation has worked properly by running ::
117121 pdfmorph -h #get some helpful information
118122 pdfmorph --version
119123
120- If installed correctly, this last command should return the version
121- of PDFmorph that you have installed on your system. To begin using
124+ If installed correctly, this last command should return the version
125+ of PDFmorph that you have installed on your system. To begin using
122126PDFmorph, run a command like ::
123127
124128 pdfmorph <target PDF file> <morphed PDF file>
125129
126130where both PDFs file are text files which contain PDF data, such as ``.gr ``
127- or ``.cgr `` files that are produced by ``PDFgetX2 ``, ``PDFgetX3 ``,
128- or ``PDFgui ``. Though some file extensions other than ``.gr `` or ``.cgr ``,
129- but with the same content structure, have been shown to work with
131+ or ``.cgr `` files that are produced by ``PDFgetX2 ``, ``PDFgetX3 ``,
132+ or ``PDFgui ``. Though some file extensions other than ``.gr `` or ``.cgr ``,
133+ but with the same content structure, have been shown to work with
130134PDFmorph, it is recommended to stick with ``.gr `` files.
131135
132136Enjoy!
133137
134138
135- DEVELOPMENT
136- ------------------------------------------------------------------------
139+ Support and Contribute
140+ ----------------------
137141
138- PDFmorph is an open-source software project on Github:
139- https://github.com/diffpy/diffpy.pdfmorph.
142+ `Diffpy user group <https://groups.google.com/g/diffpy-users >`_ is the discussion forum for general questions and discussions about the use of diffpy.pdfmorph. Please join the diffpy.pdfmorph users community by joining the Google group. The diffpy.pdfmorph project welcomes your expertise and enthusiasm!
140143
141- Feel free to fork the project and contribute! To install PDFmorph
142- in a development mode where the source files are used directly
143- rather than copied to a system directory, use ::
144+ If you see a bug or want to request a feature, please `report it as an issue <https://github.com/diffpy/diffpy.pdfmorph/issues >`_ and/or `submit a fix as a PR <https://github.com/diffpy/diffpy.pdfmorph/pulls >`_. You can also post it to the `Diffpy user group <https://groups.google.com/g/diffpy-users >`_.
144145
145- python -m pip install -e .
146+ Feel free to fork the project and contribute. To install diffpy.pdfmorph
147+ in a development mode, with its sources being directly used by Python
148+ rather than copied to a package directory, use the following in the root
149+ directory ::
146150
147- CONTRIBUTING
148- ------------------------------------------------------------------------
149- We welcome contributors from the community. Please consider posting issues, and taking issues and posting PRs.
151+ pip install -e .
150152
151153To ensure code quality and to prevent accidental commits into the default branch, please set up the use of our pre-commit
152154hooks.
@@ -157,12 +159,14 @@ hooks.
157159
158160Thereafter your code will be linted by black and isort and checked against flake8 before you can commit.
159161If it fails by black or isort, just rerun and it should pass (black and isort will modify the files so should
160- pass after they are modified). If the flake8 test fails please see the error messages and fix them manually before
162+ pass after they are modified). If the flake8 test fails please see the error messages and fix them manually before
161163trying to commit again.
162164
165+ Improvements and fixes are always appreciated.
163166
164- CONTACTS
165- ------------------------------------------------------------------------
167+ Before contribuing, please read our `Code of Conduct <https://github.com/diffpy/diffpy.pdfmorph/blob/main/CODE_OF_CONDUCT.rst >`_.
168+
169+ Contact
170+ -------
166171
167- For more information on PDFmorph, visit the `PDFmorph project web-page, <https://github.com/diffpy/diffpy.github.io/blob/source/products/pdfmorph.rst/ >`_
168- or email Professor Simon Billinge at sb2896@columbia.edu
172+ For more information on diffpy.pdfmorph please visit the project `web-page <https://diffpy.github.io/ >`_ or email Prof. Simon Billinge at sb2896@columbia.edu.
0 commit comments