Skip to content

Commit 6549205

Browse files
committed
Populate API
1 parent 5aae78d commit 6549205

7 files changed

+233
-43
lines changed

Diff for: doc/source/api/diffpy.pdfmorph.example_package.rst

-25
This file was deleted.

Diff for: doc/source/api/diffpy.pdfmorph.morph_helpers.rst

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
:tocdepth: -1
2+
3+
diffpy.pdfmorph.morph_helpers package
4+
=====================================
5+
6+
.. automodule:: diffpy.pdfmorph.morph_helpers
7+
:members:
8+
:undoc-members:
9+
:show-inheritance:
10+
11+
Submodules
12+
----------
13+
14+
diffpy.pdfmorph.morph_helpers.transformpdftordf module
15+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16+
17+
.. automodule:: diffpy.pdfmorph.morph_helpers.transformpdftordf
18+
:members:
19+
:undoc-members:
20+
:show-inheritance:
21+
22+
diffpy.pdfmorph.morph_helpers.transformrdftopdf module
23+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24+
25+
.. automodule:: diffpy.pdfmorph.morph_helpers.transformrdftopdf
26+
:members:
27+
:undoc-members:
28+
:show-inheritance:

Diff for: doc/source/api/diffpy.pdfmorph.morphs.rst

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
:tocdepth: -1
2+
3+
diffpy.pdfmorph.morphs package
4+
==============================
5+
6+
.. automodule:: diffpy.pdfmorph.morphs
7+
:members:
8+
:undoc-members:
9+
:show-inheritance:
10+
11+
Submodules
12+
----------
13+
14+
diffpy.pdfmorph.morphs.morphishape module
15+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16+
17+
.. automodule:: diffpy.pdfmorph.morphs.morphishape
18+
:members:
19+
:undoc-members:
20+
:show-inheritance:
21+
22+
diffpy.pdfmorph.morphs.morphchain module
23+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24+
25+
.. automodule:: diffpy.pdfmorph.morphs.morphchain
26+
:members:
27+
:undoc-members:
28+
:show-inheritance:
29+
30+
diffpy.pdfmorph.morphs.morphresolution module
31+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
32+
33+
.. automodule:: diffpy.pdfmorph.morphs.morphresolution
34+
:members:
35+
:undoc-members:
36+
:show-inheritance:
37+
38+
diffpy.pdfmorph.morphs.morphshape module
39+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
40+
41+
.. automodule:: diffpy.pdfmorph.morphs.morphshape
42+
:members:
43+
:undoc-members:
44+
:show-inheritance:
45+
46+
diffpy.pdfmorph.morphs.morphshift module
47+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48+
49+
.. automodule:: diffpy.pdfmorph.morphs.morphshift
50+
:members:
51+
:undoc-members:
52+
:show-inheritance:
53+
54+
diffpy.pdfmorph.morphs.morph module
55+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
56+
57+
.. automodule:: diffpy.pdfmorph.morphs.morph
58+
:members:
59+
:undoc-members:
60+
:show-inheritance:
61+
62+
diffpy.pdfmorph.morphs.morphrgrid module
63+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
64+
65+
.. automodule:: diffpy.pdfmorph.morphs.morphrgrid
66+
:members:
67+
:undoc-members:
68+
:show-inheritance:
69+
70+
diffpy.pdfmorph.morphs.morphsmear module
71+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
72+
73+
.. automodule:: diffpy.pdfmorph.morphs.morphsmear
74+
:members:
75+
:undoc-members:
76+
:show-inheritance:
77+
78+
diffpy.pdfmorph.morphs.morphstretch module
79+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
80+
81+
.. automodule:: diffpy.pdfmorph.morphs.morphstretch
82+
:members:
83+
:undoc-members:
84+
:show-inheritance:
85+
86+
diffpy.pdfmorph.morphs.morphscale module
87+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
88+
89+
.. automodule:: diffpy.pdfmorph.morphs.morphscale
90+
:members:
91+
:undoc-members:
92+
:show-inheritance:

Diff for: doc/source/api/diffpy.pdfmorph.rst

+56-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
:tocdepth: -1
22

33
diffpy.pdfmorph package
4-
=======================================
4+
=======================
55

66
.. automodule:: diffpy.pdfmorph
77
:members:
@@ -12,15 +12,66 @@ Subpackages
1212
-----------
1313

1414
.. toctree::
15-
diffpy.pdfmorph.example_package
15+
:titlesonly:
16+
17+
diffpy.pdfmorph.morphs
18+
diffpy.pdfmorph.morph_helpers
1619

1720
Submodules
1821
----------
1922

20-
diffpy.pdfmorph.example_submodule module
21-
------------------------------------------------------------
23+
diffpy.pdfmorph.pdfplot module
24+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25+
26+
.. automodule:: diffpy.pdfmorph.pdfplot
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:
30+
31+
diffpy.pdfmorph.pdfmorph_api module
32+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33+
34+
.. automodule:: diffpy.pdfmorph.pdfmorph_api
35+
:members:
36+
:undoc-members:
37+
:show-inheritance:
38+
39+
diffpy.pdfmorph.refine module
40+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
41+
42+
.. automodule:: diffpy.pdfmorph.refine
43+
:members:
44+
:undoc-members:
45+
:show-inheritance:
46+
47+
diffpy.pdfmorph.tools module
48+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
49+
50+
.. automodule:: diffpy.pdfmorph.tools
51+
:members:
52+
:undoc-members:
53+
:show-inheritance:
54+
55+
diffpy.pdfmorph.pdfmorph_io module
56+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
57+
58+
.. automodule:: diffpy.pdfmorph.pdfmorph_io
59+
:members:
60+
:undoc-members:
61+
:show-inheritance:
62+
63+
diffpy.pdfmorph.log module
64+
^^^^^^^^^^^^^^^^^^^^^^^^^^
65+
66+
.. automodule:: diffpy.pdfmorph.log
67+
:members:
68+
:undoc-members:
69+
:show-inheritance:
70+
71+
diffpy.pdfmorph.pdfmorphapp module
72+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2273

23-
.. automodule:: diffpy.pdfmorph.example_submodule
74+
.. automodule:: diffpy.pdfmorph.pdfmorphapp
2475
:members:
2576
:undoc-members:
2677
:show-inheritance:

Diff for: doc/source/conf.py

+13-8
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,21 @@
1313
# All configuration values have a default; values that are commented out
1414
# serve to show the default.
1515

16-
import os
1716
import sys
1817
import time
1918
from importlib.metadata import version
19+
from pathlib import Path
20+
21+
autodoc_mock_imports = [
22+
"diffpy.utils",
23+
]
2024

2125
# If extensions (or modules to document with autodoc) are in another directory,
2226
# add these directories to sys.path here. If the directory is relative to the
23-
# documentation root, use os.path.abspath to make it absolute, like shown here.
24-
# sys.path.insert(0, os.path.abspath('.'))
25-
sys.path.insert(0, os.path.abspath("../.."))
26-
sys.path.insert(0, os.path.abspath("../../src"))
27-
28-
# abbreviations
27+
# documentation root, use Path().resolve() to make it absolute, like shown here.
28+
# sys.path.insert(0, str(Path(".").resolve()))
29+
sys.path.insert(0, str(Path("../..").resolve()))
30+
sys.path.insert(0, str(Path("../../src").resolve())) # abbreviations
2931
ab_authors = "Billinge Group members and community contributors"
3032

3133
# -- General configuration ------------------------------------------------
@@ -38,8 +40,11 @@
3840
# ones.
3941
extensions = [
4042
"sphinx.ext.autodoc",
41-
"sphinx.ext.intersphinx",
43+
"sphinx.ext.napoleon",
44+
"sphinx.ext.todo",
4245
"sphinx.ext.viewcode",
46+
"sphinx.ext.intersphinx",
47+
"sphinx_rtd_theme",
4348
"m2r",
4449
]
4550

Diff for: doc/source/index.rst

+40-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,49 @@ diffpy.pdfmorph - Tools for manipulating and comparing PDF profiles.
77
| Software version |release|.
88
| Last updated |today|.
99
10+
Introduction
11+
++++++++++++
12+
13+
``PDFmorph`` is a Python package that increases the insight
14+
researchers can obtain from measured atomic pair distribution functions
15+
(PDFs) in a model-independent way. It was designed to help a
16+
researcher answer the question: "Has my material undergone a phase
17+
transition between these two measurements?"
18+
19+
One approach is to compare the two PDFs in a plot and view the
20+
difference curve underneath. However, significant signal can be seen in
21+
the difference curve from benign effects such as thermal expansion (peak
22+
shifts) and increased thermal motion (peak broadening) or a change in
23+
scale due to differences in incident flux, for example. ``PDFmorph`` will
24+
do its best to correct for these benign effects before computing and
25+
plotting the difference curve. One measured PDF (typically that
26+
collected under higher temperature) is identified as the target PDF and
27+
the second PDF is then morphed by "stretching" (changing the r-axis to
28+
simulate a uniform lattice expansion), "smearing" (broadening peaks
29+
through a uniform convolution to simulate increased thermal motion), and
30+
"scaling" (self-explanatory). PDFmorph will vary the amplitude of the
31+
morphing transformations to obtain the best fit between the morphed and
32+
the target PDFs, then plot them on top of each other with the difference
33+
plotted below.
34+
35+
There are also a few other morphing transformations in the program.
36+
If no morphing transformation is specified, ``PDFmorph`` will return just
37+
the plotted PDFs.
38+
39+
Finally, we note that though ``PDFmorph`` should work on other spectra
40+
that are not PDFs, it has not been extensively tested beyond the PDF.
41+
42+
To get started, please download our :download:`user manual <../manual/pdfmorph.pdf>`
43+
or visit the :ref:`quick_start`.
44+
1045
=======
1146
Authors
1247
=======
1348

14-
diffpy.pdfmorph is developed by Billinge Group
15-
and its community contributors.
49+
``PDFmorph`` is developed by members of the Billinge Group at
50+
Columbia University and Brookhaven National Laboratory including
51+
Christopher L. Farrow, Christopher J. Wright, Pavol Juhás, Chia-Hao
52+
(Timothy) Liu, S. Matthew Román, and Simon J. L. Billinge.
1653

1754
For a detailed list of contributors see
1855
https://github.com/diffpy/diffpy.pdfmorph/graphs/contributors.
@@ -30,6 +67,7 @@ Table of contents
3067
.. toctree::
3168
:titlesonly:
3269

70+
quickstart
3371
license
3472
release
3573
Package API <api/diffpy.pdfmorph>

Diff for: doc/source/quickstart.rst

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ PDFmorph Tutorial
55

66
Welcome! This will be a quick tutorial to accquaint users with PDFmorph
77
and some of what it can do. For a more detailed tutorial, check out
8-
our :download:`user manual <../pdfmorph.pdf>`.
8+
our :download:`user manual <../manual/pdfmorph.pdf>`.
99

1010
As we described in the README and installation instructions, please make
1111
sure that you are familiar with working with your command line terminal
@@ -36,7 +36,7 @@ Basic PDFmorph Workflow
3636
3. Using the ``mkdir`` command, create a directory where you'll
3737
store the tutorial PDF files and use the ``cd`` command to change
3838
into that directory. You can download the tutorial files
39-
:download:`here <../../../tutorial/tutorialData.zip>`.
39+
:download:`here <../../tutorial/tutorialData.zip>`.
4040
Then, ``cd`` into the ``tutorialData`` directory.
4141

4242
* The files in this dataset were collected by Soham Banerjee
@@ -179,13 +179,14 @@ Enjoy the software!
179179
.. Additional PDFmorph Functionality/Exploration
180180
.. ---------------------------------------------
181181
.. TODO include undoped PDF example
182+
182183
Extra Tutorials
183184
===============
184185
PDFmorph has some more functionalities not showcased in the basic workflow above
185186
(see `pdfmorph --help` for an overview of these functionalities).
186187
Tutorials for these additional functionalities are included below. Additional
187188
files for these tutorials can be downloaded
188-
:download:`here <../../../tutorial/additionalData.zip>`.
189+
:download:`here <../../tutorial/additionalData.zip>`.
189190

190191
Performing Multiple Morphs
191192
--------------------------

0 commit comments

Comments
 (0)