Skip to content

Commit 57581b6

Browse files
authored
Merge pull request #172 from Sparks29032/diffpy.morph
Refactor PDFmorph to diffpy.morph
2 parents 6526430 + c196bc3 commit 57581b6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+506
-501
lines changed

Diff for: .github/workflows/build-wheel-release-upload.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
release:
1111
uses: Billingegroup/release-scripts/.github/workflows/_build-wheel-release-upload.yml@v0
1212
with:
13-
project: diffpy.pdfmorph
13+
project: diffpy.morph
1414
secrets:
1515
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
1616
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}

Diff for: .github/workflows/check-news-item.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ jobs:
99
check-news-item:
1010
uses: Billingegroup/release-scripts/.github/workflows/_check-news-item.yml@v0
1111
with:
12-
project: diffpy.pdfmorph
12+
project: diffpy.morph

Diff for: .github/workflows/matrix-and-codecov-on-merge-to-main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
matrix-coverage:
1515
uses: Billingegroup/release-scripts/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml@v0
1616
with:
17-
project: diffpy.pdfmorph
17+
project: diffpy.morph
1818
c_extension: false
1919
headless: false
2020
secrets:

Diff for: .github/workflows/tests-on-pr.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
tests-on-pr:
1212
uses: Billingegroup/release-scripts/.github/workflows/_tests-on-pr.yml@v0
1313
with:
14-
project: diffpy.pdfmorph
14+
project: diffpy.morph
1515
c_extension: false
1616
headless: false
1717
secrets:

Diff for: AUTHORS.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ Contributors
77
------------
88

99
For a list of contributors, visit
10-
https://github.com/diffpy/diffpy.pdfmorph/graphs/contributors
10+
https://github.com/diffpy/diffpy.morph/graphs/contributors

Diff for: README.rst

+50-50
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
|Icon| `diffpy.pdfmorph <https://diffpy.github.io/diffpy.pdfmorph>`_
2-
====================================================================
1+
|Icon| `diffpy.morph <https://diffpy.github.io/diffpy.morph>`_
2+
==============================================================
33

44
.. |Icon| image:: https://avatars.githubusercontent.com/diffpy
5-
:target: https://diffpy.github.io/diffpy.pdfmorph
5+
:target: https://diffpy.github.io/diffpy.morph
66
:height: 100px
77

88
|PyPi| |Forge| |PythonVersion| |PR|
@@ -12,29 +12,29 @@
1212
.. |Black| image:: https://img.shields.io/badge/code_style-black-black
1313
:target: https://github.com/psf/black
1414

15-
.. |CI| image:: https://github.com/diffpy/diffpy.pdfmorph/actions/workflows/matrix-and-codecov-on-merge-to-main.yml/badge.svg
16-
:target: https://github.com/diffpy/diffpy.pdfmorph/actions/workflows/matrix-and-codecov-on-merge-to-main.yml
15+
.. |CI| image:: https://github.com/diffpy/diffpy.morph/actions/workflows/matrix-and-codecov-on-merge-to-main.yml/badge.svg
16+
:target: https://github.com/diffpy/diffpy.morph/actions/workflows/matrix-and-codecov-on-merge-to-main.yml
1717

18-
.. |Codecov| image:: https://codecov.io/gh/diffpy/diffpy.pdfmorph/branch/main/graph/badge.svg
19-
:target: https://codecov.io/gh/diffpy/diffpy.pdfmorph
18+
.. |Codecov| image:: https://codecov.io/gh/diffpy/diffpy.morph/branch/main/graph/badge.svg
19+
:target: https://codecov.io/gh/diffpy/diffpy.morph
2020

21-
.. |Forge| image:: https://img.shields.io/conda/vn/conda-forge/diffpy.pdfmorph
22-
:target: https://anaconda.org/conda-forge/diffpy.pdfmorph
21+
.. |Forge| image:: https://img.shields.io/conda/vn/conda-forge/diffpy.morph
22+
:target: https://anaconda.org/conda-forge/diffpy.morph
2323

2424
.. |PR| image:: https://img.shields.io/badge/PR-Welcome-29ab47ff
2525

26-
.. |PyPi| image:: https://img.shields.io/pypi/v/diffpy.pdfmorph
27-
:target: https://pypi.org/project/diffpy.pdfmorph/
26+
.. |PyPi| image:: https://img.shields.io/pypi/v/diffpy.morph
27+
:target: https://pypi.org/project/diffpy.morph/
2828

29-
.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/diffpy.pdfmorph
30-
:target: https://pypi.org/project/diffpy.pdfmorph/
29+
.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/diffpy.morph
30+
:target: https://pypi.org/project/diffpy.morph/
3131

3232
.. |Tracking| image:: https://img.shields.io/badge/issue_tracking-github-blue
33-
:target: https://github.com/diffpy/diffpy.pdfmorph/issues
33+
:target: https://github.com/diffpy/diffpy.morph/issues
3434

3535
Tools for manipulating and comparing PDF profiles
3636

37-
PDFmorph is a Python software package designed to increase the insight
37+
``diffpy.morph`` is a Python software package designed to increase the insight
3838
researchers can obtain from measured atomic pair distribution functions
3939
(PDFs) in a model-independent way. The program was designed to help a
4040
researcher answer the question: "Has my material undergone a phase
@@ -44,42 +44,42 @@ One approach is to compare the two PDFs in a plot and view the difference
4444
curve underneath. However, significant signal can be seen in the
4545
difference curve from benign effects such as thermal expansion (peak
4646
shifts) and increased thermal motion (peak broadening) or a change in
47-
scale due to differences in incident flux, for example. PDFmorph will
47+
scale due to differences in incident flux, for example. ``diffpy.morph`` will
4848
do its best to correct for these benign effects before computing and
4949
plotting the difference curve. One measured PDF (typically that collected
5050
at higher temperature) is identified as the target PDF and the second
5151
PDF is then morphed by "stretching" (changing the r-axis to simulate a
5252
uniform lattice expansion), "smearing" (broadening peaks through a
5353
uniform convolution to simulate increased thermal motion), and "scaling"
54-
(self-explanatory). PDFmorph will vary the amplitude of the morphing
54+
(self-explanatory). ``diffpy.morph`` will vary the amplitude of the morphing
5555
transformations to obtain the best fit between the morphed and the target
5656
PDFs, then plot them on top of each other with the difference plotted
5757
below.
5858

5959
There are also a few other morphing transformations in the program.
6060

61-
Finally, we note that PDFmorph should work on other spectra that are not
61+
Finally, we note that ``diffpy.morph`` should work on other spectra that are not
6262
PDFs, though it has not been extensively tested beyond the PDF.
6363

6464

65-
For more information about the diffpy.pdfmorph library, please consult our `online documentation <https://diffpy.github.io/diffpy.pdfmorph>`_.
65+
For more information about the diffpy.morph library, please consult our `online documentation <https://diffpy.github.io/diffpy.morph>`_.
6666

6767
Citation
6868
--------
6969

70-
If you use diffpy.pdfmorph in a scientific publication, we would like you to cite this package as
70+
If you use diffpy.morph in a scientific publication, we would like you to cite this package as
7171

72-
diffpy.pdfmorph Package, https://github.com/diffpy/diffpy.pdfmorph
72+
diffpy.morph Package, https://github.com/diffpy/diffpy.morph
7373

7474
REQUIREMENTS
7575
------------------------------------------------------------------------
7676

77-
PDFmorph is currently run from the command line, which requires opening
77+
``diffpy.morph`` is currently run from the command line, which requires opening
7878
and typing into a terminal window or Windows command prompt. It is
7979
recommended that you consult online resources and become somewhat
80-
familiar before using PDFmorph.
80+
familiar before using ``diffpy.morph``.
8181

82-
PDFmorph can be run with Python 3.10 or higher. It makes use of several third party
82+
``diffpy.morph`` can be run with Python 3.10 or higher. It makes use of several third party
8383
libraries that you'll need to run the app and its components.
8484

8585
* `NumPy` - library for scientific computing with Python
@@ -102,79 +102,79 @@ To add "conda-forge" to the conda channels, run the following in a terminal. ::
102102
conda config --add channels conda-forge
103103

104104
We want to install our packages in a suitable conda environment.
105-
The following creates and activates a new environment named ``diffpy.pdfmorph_env`` ::
105+
The following creates and activates a new environment named ``diffpy.morph_env`` ::
106106

107-
conda create -n diffpy.pdfmorph_env diffpy.pdfmorph
108-
conda activate diffpy.pdfmorph_env
107+
conda create -n diffpy.morph_env diffpy.morph
108+
conda activate diffpy.morph_env
109109

110110
To confirm that the installation was successful, type::
111111

112-
python -c "import diffpy.pdfmorph; print(diffpy.pdfmorph.__version__)"
112+
python -c "import diffpy.morph; print(diffpy.morph.__version__)"
113113

114114
The output should print the latest version displayed on the badges above.
115115

116116
If the above does not work, you can use ``pip`` to download and install the latest release from
117117
`Python Package Index <https://pypi.python.org>`_.
118-
To install using ``pip`` into your ``diffpy.pdfmorph_env`` environment, we will also have to install dependencies ::
118+
To install using ``pip`` into your ``diffpy.morph_env`` environment, we will also have to install dependencies ::
119119

120-
pip install -r https://raw.githubusercontent.com/diffpy/diffpy.pdfmorph/main/requirements/pip.txt
120+
pip install -r https://raw.githubusercontent.com/diffpy/diffpy.morph/main/requirements/pip.txt
121121

122122
and then install the package ::
123123

124-
pip install diffpy.pdfmorph
124+
pip install diffpy.morph
125125

126126
If you prefer to install from sources, after installing the dependencies, obtain the source archive from
127-
`GitHub <https://github.com/diffpy/diffpy.pdfmorph/>`_. Once installed, ``cd`` into your ``diffpy.pdfmorph`` directory
127+
`GitHub <https://github.com/diffpy/diffpy.morph/>`_. Once installed, ``cd`` into your ``diffpy.morph`` directory
128128
and run the following ::
129129

130130
pip install .
131131

132132
Getting Started
133133
---------------
134134

135-
You may consult our `online documentation <https://diffpy.github.io/diffpy.pdfmorph>`_ for tutorials and API references.
135+
You may consult our `online documentation <https://diffpy.github.io/diffpy.morph>`_ for tutorials and API references.
136136

137-
USING PDFmorph
138-
------------------------------------------------------------------------
137+
USING diffpy.morph
138+
------------------
139139

140140
For detailed instructions and full tutorial, consult the user manual
141-
on our `website <www.diffpy.org/diffpy.pdfmorph/>`.
141+
on our `website <www.diffpy.org/diffpy.morph/>`.
142142

143-
Once the required software, including PDFmorph is all installed, open
143+
Once the required software, including ``diffpy.morph`` is all installed, open
144144
up a terminal and check installation has worked properly by running ::
145145

146-
source activate pdfmorph_env #if the environment isn't already active
147-
pdfmorph -h #get some helpful information
148-
pdfmorph --version
146+
source activate diffpy.morph_env #if the environment isn't already active
147+
diffpy.morph -h #get some helpful information
148+
diffpy.morph --version
149149

150150
If installed correctly, this last command should return the version
151-
of PDFmorph that you have installed on your system. To begin using
152-
PDFmorph, run a command like ::
151+
of ``diffpy.morph`` that you have installed on your system. To begin using
152+
``diffpy.morph``, run a command like ::
153153

154-
pdfmorph <target PDF file> <morphed PDF file>
154+
diffpy.morph <target PDF file> <morphed PDF file>
155155

156156
where both PDFs file are text files which contain PDF data, such as ``.gr``
157157
or ``.cgr`` files that are produced by ``PDFgetX2``, ``PDFgetX3``,
158158
or ``PDFgui``. Though some file extensions other than ``.gr`` or ``.cgr``,
159159
but with the same content structure, have been shown to work with
160-
PDFmorph, it is recommended to stick with ``.gr`` files.
160+
``diffpy.morph``, it is recommended to stick with ``.gr`` files.
161161

162162
Enjoy!
163163

164164

165165
Support and Contribute
166166
----------------------
167167

168-
`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!
168+
`Diffpy user group <https://groups.google.com/g/diffpy-users>`_ is the discussion forum for general questions and discussions about the use of diffpy.morph. Please join the diffpy.morph users community by joining the Google group. The diffpy.morph project welcomes your expertise and enthusiasm!
169169

170-
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>`_.
170+
If you see a bug or want to request a feature, please `report it as an issue <https://github.com/diffpy/diffpy.morph/issues>`_ and/or `submit a fix as a PR <https://github.com/diffpy/diffpy.morph/pulls>`_. You can also post it to the `Diffpy user group <https://groups.google.com/g/diffpy-users>`_.
171171

172-
Feel free to fork the project and contribute. To install diffpy.pdfmorph
172+
Feel free to fork the project and contribute. To install diffpy.morph
173173
in a development mode, with its sources being directly used by Python
174174
rather than copied to a package directory, use the following in the root
175175
directory ::
176176

177-
pip install -e .
177+
pip install -e .
178178

179179
To ensure code quality and to prevent accidental commits into the default branch, please set up the use of our pre-commit
180180
hooks.
@@ -190,9 +190,9 @@ trying to commit again.
190190

191191
Improvements and fixes are always appreciated.
192192

193-
Before contributing, please read our `Code of Conduct <https://github.com/diffpy/diffpy.pdfmorph/blob/main/CODE_OF_CONDUCT.rst>`_.
193+
Before contributing, please read our `Code of Conduct <https://github.com/diffpy/diffpy.morph/blob/main/CODE_OF_CONDUCT.rst>`_.
194194

195195
Contact
196196
-------
197197

198-
For more information on diffpy.pdfmorph please visit the project `web-page <https://diffpy.github.io/>`_ or email Prof. Simon Billinge at [email protected].
198+
For more information on diffpy.morph please visit the project `web-page <https://diffpy.github.io/>`_ or email Prof. Simon Billinge at [email protected].

0 commit comments

Comments
 (0)