diffpy.labpdfproc 0.1.1__tar.gz → 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. diffpy_labpdfproc-0.1.2/.codecov.yml +34 -0
  2. diffpy_labpdfproc-0.1.2/.coveragerc +13 -0
  3. diffpy_labpdfproc-0.1.2/.flake8 +11 -0
  4. diffpy_labpdfproc-0.1.2/.isort.cfg +4 -0
  5. diffpy_labpdfproc-0.1.2/.pre-commit-config.yaml +46 -0
  6. {diffpy_labpdfproc-0.1.1 → diffpy_labpdfproc-0.1.2}/AUTHORS.rst +1 -1
  7. diffpy_labpdfproc-0.1.2/CHANGELOG.rst +35 -0
  8. diffpy_labpdfproc-0.1.2/CODE_OF_CONDUCT.rst +133 -0
  9. diffpy_labpdfproc-0.1.2/MANIFEST.in +13 -0
  10. {diffpy_labpdfproc-0.1.1 → diffpy_labpdfproc-0.1.2}/PKG-INFO +55 -14
  11. {diffpy_labpdfproc-0.1.1 → diffpy_labpdfproc-0.1.2}/README.rst +49 -11
  12. diffpy_labpdfproc-0.1.2/environment.yml +6 -0
  13. {diffpy_labpdfproc-0.1.1 → diffpy_labpdfproc-0.1.2}/pyproject.toml +9 -3
  14. diffpy_labpdfproc-0.1.2/requirements/README.txt +11 -0
  15. diffpy_labpdfproc-0.1.2/requirements/build.txt +2 -0
  16. diffpy_labpdfproc-0.1.2/requirements/conda.txt +4 -0
  17. diffpy_labpdfproc-0.1.2/requirements/docs.txt +4 -0
  18. diffpy_labpdfproc-0.1.2/requirements/pip.txt +4 -0
  19. diffpy_labpdfproc-0.1.2/requirements/requirements-dev.txt +20 -0
  20. diffpy_labpdfproc-0.1.2/requirements/test.txt +7 -0
  21. {diffpy_labpdfproc-0.1.1 → diffpy_labpdfproc-0.1.2}/src/diffpy/labpdfproc/__init__.py +1 -1
  22. diffpy_labpdfproc-0.1.2/src/diffpy/labpdfproc/data/coefficient_list.csv +5 -0
  23. diffpy_labpdfproc-0.1.2/src/diffpy/labpdfproc/data/inverse_cve.xy +1791 -0
  24. {diffpy_labpdfproc-0.1.1 → diffpy_labpdfproc-0.1.2}/src/diffpy/labpdfproc/functions.py +95 -36
  25. diffpy_labpdfproc-0.1.2/src/diffpy/labpdfproc/labpdfprocapp.py +179 -0
  26. diffpy_labpdfproc-0.1.2/src/diffpy/labpdfproc/mud_calculator.py +100 -0
  27. {diffpy_labpdfproc-0.1.1 → diffpy_labpdfproc-0.1.2}/src/diffpy/labpdfproc/tools.py +30 -8
  28. {diffpy_labpdfproc-0.1.1 → diffpy_labpdfproc-0.1.2}/src/diffpy.labpdfproc.egg-info/PKG-INFO +55 -14
  29. diffpy_labpdfproc-0.1.2/src/diffpy.labpdfproc.egg-info/SOURCES.txt +42 -0
  30. diffpy_labpdfproc-0.1.2/src/diffpy.labpdfproc.egg-info/entry_points.txt +2 -0
  31. diffpy_labpdfproc-0.1.2/src/diffpy.labpdfproc.egg-info/requires.txt +4 -0
  32. diffpy_labpdfproc-0.1.2/tests/conftest.py +71 -0
  33. diffpy_labpdfproc-0.1.2/tests/test_fixtures.py +18 -0
  34. diffpy_labpdfproc-0.1.2/tests/test_functions.py +128 -0
  35. diffpy_labpdfproc-0.1.2/tests/test_mud_calculator.py +22 -0
  36. diffpy_labpdfproc-0.1.2/tests/test_tools.py +349 -0
  37. diffpy_labpdfproc-0.1.2/tests/test_version.py +10 -0
  38. diffpy_labpdfproc-0.1.1/LICENSE +0 -29
  39. diffpy_labpdfproc-0.1.1/MANIFEST.in +0 -16
  40. diffpy_labpdfproc-0.1.1/src/diffpy/labpdfproc/labpdfprocapp.py +0 -147
  41. diffpy_labpdfproc-0.1.1/src/diffpy.labpdfproc.egg-info/SOURCES.txt +0 -17
  42. {diffpy_labpdfproc-0.1.1 → diffpy_labpdfproc-0.1.2}/LICENSE.rst +0 -0
  43. {diffpy_labpdfproc-0.1.1 → diffpy_labpdfproc-0.1.2}/doc/examples/zro2_mo.xy +0 -0
  44. {diffpy_labpdfproc-0.1.1 → diffpy_labpdfproc-0.1.2}/setup.cfg +0 -0
  45. {diffpy_labpdfproc-0.1.1 → diffpy_labpdfproc-0.1.2}/src/diffpy/__init__.py +0 -0
  46. {diffpy_labpdfproc-0.1.1 → diffpy_labpdfproc-0.1.2}/src/diffpy/labpdfproc/version.py +0 -0
  47. {diffpy_labpdfproc-0.1.1 → diffpy_labpdfproc-0.1.2}/src/diffpy.labpdfproc.egg-info/dependency_links.txt +0 -0
  48. {diffpy_labpdfproc-0.1.1 → diffpy_labpdfproc-0.1.2}/src/diffpy.labpdfproc.egg-info/top_level.txt +0 -0
@@ -0,0 +1,34 @@
1
+ # codecov can find this file anywhere in the repo, so we don't need to clutter
2
+ # the root folder.
3
+ #comment: false
4
+
5
+ codecov:
6
+ notify:
7
+ require_ci_to_pass: no
8
+
9
+ coverage:
10
+ status:
11
+ patch:
12
+ default:
13
+ target: '70'
14
+ if_no_uploads: error
15
+ if_not_found: success
16
+ if_ci_failed: failure
17
+ project:
18
+ default: false
19
+ library:
20
+ target: auto
21
+ if_no_uploads: error
22
+ if_not_found: success
23
+ if_ci_failed: error
24
+ paths: '!*/tests/.*'
25
+
26
+ tests:
27
+ target: 97.9%
28
+ paths: '*/tests/.*'
29
+ if_not_found: success
30
+
31
+ flags:
32
+ tests:
33
+ paths:
34
+ - tests/
@@ -0,0 +1,13 @@
1
+ [run]
2
+ source =
3
+ diffpy.labpdfproc
4
+ [report]
5
+ omit =
6
+ */python?.?/*
7
+ */site-packages/nose/*
8
+ # ignore _version.py and versioneer.py
9
+ .*version.*
10
+ *_version.py
11
+
12
+ exclude_lines =
13
+ if __name__ == '__main__':
@@ -0,0 +1,11 @@
1
+ [flake8]
2
+ exclude =
3
+ .git,
4
+ __pycache__,
5
+ build,
6
+ dist,
7
+ doc/source/conf.py
8
+ max-line-length = 115
9
+ # Ignore some style 'errors' produced while formatting by 'black'
10
+ # https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#labels-why-pycodestyle-warnings
11
+ extend-ignore = E203
@@ -0,0 +1,4 @@
1
+ [settings]
2
+ line_length = 115
3
+ multi_line_output = 3
4
+ include_trailing_comma = True
@@ -0,0 +1,46 @@
1
+ default_language_version:
2
+ python: python3
3
+ ci:
4
+ autofix_commit_msg: |
5
+ [pre-commit.ci] auto fixes from pre-commit hooks
6
+ autofix_prs: true
7
+ autoupdate_branch: 'pre-commit-autoupdate'
8
+ autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
9
+ autoupdate_schedule: monthly
10
+ skip: [no-commit-to-branch]
11
+ submodules: false
12
+ repos:
13
+ - repo: https://github.com/pre-commit/pre-commit-hooks
14
+ rev: v4.6.0
15
+ hooks:
16
+ - id: check-yaml
17
+ - id: end-of-file-fixer
18
+ - id: trailing-whitespace
19
+ - id: check-case-conflict
20
+ - id: check-merge-conflict
21
+ - id: check-toml
22
+ - id: check-added-large-files
23
+ - repo: https://github.com/psf/black
24
+ rev: 24.4.2
25
+ hooks:
26
+ - id: black
27
+ - repo: https://github.com/pycqa/flake8
28
+ rev: 7.0.0
29
+ hooks:
30
+ - id: flake8
31
+ - repo: https://github.com/pycqa/isort
32
+ rev: 5.13.2
33
+ hooks:
34
+ - id: isort
35
+ args: ["--profile", "black"]
36
+ - repo: https://github.com/kynan/nbstripout
37
+ rev: 0.7.1
38
+ hooks:
39
+ - id: nbstripout
40
+ - repo: https://github.com/pre-commit/pre-commit-hooks
41
+ rev: v4.4.0
42
+ hooks:
43
+ - id: no-commit-to-branch
44
+ name: Prevent Commit to Main Branch
45
+ args: ["--branch", "main"]
46
+ stages: [pre-commit]
@@ -1,7 +1,7 @@
1
1
  Authors
2
2
  =======
3
3
 
4
- Billinge Group and community contibutors.
4
+ Billinge Group and community contributors.
5
5
 
6
6
  Contributors
7
7
  ------------
@@ -0,0 +1,35 @@
1
+ =============
2
+ Release Notes
3
+ =============
4
+
5
+ .. current developments
6
+
7
+ 0.1.2
8
+ =====
9
+
10
+ **Added:**
11
+
12
+ * polynomial interpolation as the default method for cve computation.
13
+
14
+ **Fixed:**
15
+
16
+ * add PyPI packages under pip.txt
17
+
18
+
19
+
20
+ 0.1.1
21
+ =====
22
+
23
+
24
+
25
+ 0.1.1
26
+ =====
27
+
28
+
29
+
30
+ 0.1.0
31
+ =====
32
+
33
+
34
+
35
+ Initial release of labPDFproc. Please see README and documentation for details
@@ -0,0 +1,133 @@
1
+ =====================================
2
+ Contributor Covenant Code of Conduct
3
+ =====================================
4
+
5
+ Our Pledge
6
+ ----------
7
+
8
+ We as members, contributors, and leaders pledge to make participation in our
9
+ community a harassment-free experience for everyone, regardless of age, body
10
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
11
+ identity and expression, level of experience, education, socio-economic status,
12
+ nationality, personal appearance, race, caste, color, religion, or sexual
13
+ identity and orientation.
14
+
15
+ We pledge to act and interact in ways that contribute to an open, welcoming,
16
+ diverse, inclusive, and healthy community.
17
+
18
+ Our Standards
19
+ -------------
20
+
21
+ Examples of behavior that contributes to a positive environment for our
22
+ community include:
23
+
24
+ * Demonstrating empathy and kindness toward other people
25
+ * Being respectful of differing opinions, viewpoints, and experiences
26
+ * Giving and gracefully accepting constructive feedback
27
+ * Accepting responsibility and apologizing to those affected by our mistakes,
28
+ and learning from the experience
29
+ * Focusing on what is best not just for us as individuals, but for the overall
30
+ community
31
+
32
+ Examples of unacceptable behavior include:
33
+
34
+ * The use of sexualized language or imagery, and sexual attention or advances of
35
+ any kind
36
+ * Trolling, insulting or derogatory comments, and personal or political attacks
37
+ * Public or private harassment
38
+ * Publishing others' private information, such as a physical or email address,
39
+ without their explicit permission
40
+ * Other conduct which could reasonably be considered inappropriate in a
41
+ professional setting
42
+
43
+ Enforcement Responsibilities
44
+ ----------------------------
45
+
46
+ Community leaders are responsible for clarifying and enforcing our standards of
47
+ acceptable behavior and will take appropriate and fair corrective action in
48
+ response to any behavior that they deem inappropriate, threatening, offensive,
49
+ or harmful.
50
+
51
+ Community leaders have the right and responsibility to remove, edit, or reject
52
+ comments, commits, code, wiki edits, issues, and other contributions that are
53
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
54
+ decisions when appropriate.
55
+
56
+ Scope
57
+ -----
58
+
59
+ This Code of Conduct applies within all community spaces, and also applies when
60
+ an individual is officially representing the community in public spaces.
61
+ Examples of representing our community include using an official email address,
62
+ posting via an official social media account, or acting as an appointed
63
+ representative at an online or offline event.
64
+
65
+ Enforcement
66
+ -----------
67
+
68
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
69
+ reported to the community leaders responsible for enforcement at
70
+ sb2896@columbia.edu. All complaints will be reviewed and investigated promptly and fairly.
71
+
72
+ All community leaders are obligated to respect the privacy and security of the
73
+ reporter of any incident.
74
+
75
+ Enforcement Guidelines
76
+ ----------------------
77
+
78
+ Community leaders will follow these Community Impact Guidelines in determining
79
+ the consequences for any action they deem in violation of this Code of Conduct:
80
+
81
+ 1. Correction
82
+ ****************
83
+
84
+ **Community Impact**: Use of inappropriate language or other behavior deemed
85
+ unprofessional or unwelcome in the community.
86
+
87
+ **Consequence**: A private, written warning from community leaders, providing
88
+ clarity around the nature of the violation and an explanation of why the
89
+ behavior was inappropriate. A public apology may be requested.
90
+
91
+ 2. Warning
92
+ *************
93
+
94
+ **Community Impact**: A violation through a single incident or series of
95
+ actions.
96
+
97
+ **Consequence**: A warning with consequences for continued behavior. No
98
+ interaction with the people involved, including unsolicited interaction with
99
+ those enforcing the Code of Conduct, for a specified period of time. This
100
+ includes avoiding interactions in community spaces as well as external channels
101
+ like social media. Violating these terms may lead to a temporary or permanent
102
+ ban.
103
+
104
+ 3. Temporary Ban
105
+ ******************
106
+
107
+ **Community Impact**: A serious violation of community standards, including
108
+ sustained inappropriate behavior.
109
+
110
+ **Consequence**: A temporary ban from any sort of interaction or public
111
+ communication with the community for a specified period of time. No public or
112
+ private interaction with the people involved, including unsolicited interaction
113
+ with those enforcing the Code of Conduct, is allowed during this period.
114
+ Violating these terms may lead to a permanent ban.
115
+
116
+ 4. Permanent Ban
117
+ ******************
118
+
119
+ **Community Impact**: Demonstrating a pattern of violation of community
120
+ standards, including sustained inappropriate behavior, harassment of an
121
+ individual, or aggression toward or disparagement of classes of individuals.
122
+
123
+ **Consequence**: A permanent ban from any sort of public interaction within the
124
+ community.
125
+
126
+ Attribution
127
+ -----------
128
+
129
+ This Code of Conduct is adapted from the `Contributor Covenant <https://www.contributor-covenant.org/version/2/1/code_of_conduct.html>`_.
130
+
131
+ Community Impact Guidelines were inspired by `Mozilla's code of conduct enforcement ladder <https://github.com/mozilla/inclusion>`_.
132
+
133
+ For answers to common questions about this code of conduct, see the `FAQ <https://www.contributor-covenant.org/faq>`_. `Translations are available <https://www.contributor-covenant.org/translations>`_
@@ -0,0 +1,13 @@
1
+ graft src
2
+ graft tests
3
+ graft requirements
4
+
5
+ include AUTHORS.rst LICENSE*.rst README.rst
6
+ include src/diffpy/labpdfproc/data *
7
+
8
+ # Exclude all bytecode files and __pycache__ directories
9
+ global-exclude *.py[cod] # Exclude all .pyc, .pyo, and .pyd files.
10
+ global-exclude .DS_Store # Exclude Mac filesystem artifacts.
11
+ global-exclude __pycache__ # Exclude Python cache directories.
12
+ global-exclude .git* # Exclude git files and directories.
13
+ global-exclude .idea # Exclude PyCharm project settings.
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: diffpy.labpdfproc
3
- Version: 0.1.1
4
- Summary: Tools for processing x-ray powder diffraction data from laboratory sources
3
+ Version: 0.1.2
4
+ Summary: Tools for processing x-ray powder diffraction data from laboratory sources.
5
5
  Author-email: "Simon J.L. Billinge group" <simon.billinge@gmail.com>
6
6
  Maintainer-email: "Simon J.L. Billinge group" <simon.billinge@gmail.com>
7
7
  Project-URL: Homepage, https://github.com/diffpy/diffpy.labpdfproc/
@@ -23,9 +23,12 @@ Classifier: Topic :: Scientific/Engineering :: Physics
23
23
  Classifier: Topic :: Scientific/Engineering :: Chemistry
24
24
  Requires-Python: >=3.10
25
25
  Description-Content-Type: text/x-rst
26
- License-File: LICENSE
27
26
  License-File: LICENSE.rst
28
27
  License-File: AUTHORS.rst
28
+ Requires-Dist: numpy
29
+ Requires-Dist: diffpy.utils
30
+ Requires-Dist: pandas
31
+ Requires-Dist: scipy
29
32
 
30
33
  |Icon| |title|_
31
34
  ===============
@@ -44,8 +47,8 @@ License-File: AUTHORS.rst
44
47
  .. |Black| image:: https://img.shields.io/badge/code_style-black-black
45
48
  :target: https://github.com/psf/black
46
49
 
47
- .. |CI| image:: https://github.com/diffpy/diffpy.labpdfproc/actions/workflows/main.yml/badge.svg
48
- :target: https://github.com/diffpy/diffpy.labpdfproc/actions/workflows/main.yml
50
+ .. |CI| image:: https://github.com/diffpy/diffpy.labpdfproc/actions/workflows/matrix-and-codecov-on-merge-to-main.yml/badge.svg
51
+ :target: https://github.com/diffpy/diffpy.labpdfproc/actions/workflows/matrix-and-codecov-on-merge-to-main.yml
49
52
 
50
53
  .. |Codecov| image:: https://codecov.io/gh/diffpy/diffpy.labpdfproc/branch/main/graph/badge.svg
51
54
  :target: https://codecov.io/gh/diffpy/diffpy.labpdfproc
@@ -64,9 +67,30 @@ License-File: AUTHORS.rst
64
67
  .. |Tracking| image:: https://img.shields.io/badge/issue_tracking-github-blue
65
68
  :target: https://github.com/diffpy/diffpy.labpdfproc/issues
66
69
 
67
- Tools for processing x-ray powder diffraction data from laboratory sources
70
+ Tools for processing x-ray powder diffraction data from laboratory sources.
68
71
 
69
- * LONGER DESCRIPTION HERE
72
+ PDFgetX3 has revolutionized how PDF methods can be applied to solve nanostructure problems.
73
+ However, the program was designed for use with Rapid Acquisition PDF (RAPDF) data from synchrotron sources.
74
+ A key approximation inherent in the use of PDFgetX3 for RAPDF data is that absorption effects are negligible.
75
+ This is typically not the case for laboratory x-ray diffractometers, where absorption effects can be significant.
76
+
77
+ This app is designed to preprocess data from laboratory x-ray diffractometers before using PDFgetX3 to obtain PDFs.
78
+ The app currently carries out an absorption correction assuming a parallel beam capillary geometry
79
+ which is the most common geometry for lab PDF measurements.
80
+
81
+ The theory is described in the following paper:
82
+
83
+ An ad hoc Absorption Correction for Reliable
84
+ Pair-Distribution Functions from Low Energy x-ray Sources,
85
+ Yucong Chen, Till Schertenleib, Andrew Yang, Pascal Schouwink,
86
+ Wendy L. Queen and Simon J. L. Billinge, in preparation.
87
+
88
+ The related experimental data acquisition protocols are described in the following paper:
89
+
90
+ Protocols for Obtaining Reliable PDFs from Laboratory
91
+ x-ray Sources Using PDFgetX3,
92
+ Till Schertenleib, Daniel Schmuckler, Yucong Chen, Geng Bang Jin,
93
+ Wendy L. Queen and Simon J. L. Billinge, in preparation.
70
94
 
71
95
  For more information about the diffpy.labpdfproc library, please consult our `online documentation <https://diffpy.github.io/diffpy.labpdfproc>`_.
72
96
 
@@ -100,11 +124,7 @@ Then, to fully install ``diffpy.labpdfproc`` in our active environment, run ::
100
124
 
101
125
  Another option is to use ``pip`` to download and install the latest release from
102
126
  `Python Package Index <https://pypi.python.org>`_.
103
- To install using ``pip`` into your ``diffpy.labpdfproc_env`` environment, we will also have to install dependencies ::
104
-
105
- pip install -r https://raw.githubusercontent.com/diffpy/diffpy.labpdfproc/main/requirements/run.txt
106
-
107
- and then install the package ::
127
+ To install using ``pip`` into your ``diffpy.labpdfproc_env`` environment, type ::
108
128
 
109
129
  pip install diffpy.labpdfproc
110
130
 
@@ -114,12 +134,33 @@ and run the following ::
114
134
 
115
135
  pip install .
116
136
 
137
+ Example
138
+ -------
139
+
140
+ Navigate to the directory that contains 1D diffraction patterns that you would like to process.
141
+ Activate the conda environment (`conda activate diffpy.labpdfproc_env`) that contains the package and run the following command ::
142
+
143
+ labpdfproc <muD> <path/to/inputfile.txt>
144
+
145
+ Here replace <muD> with the value of muD for your sample
146
+ and <path/to/inputfile.txt> with the path and filename of your input file.
147
+ For example, if the uncorrected data case is called zro2_mo.xy and is in the current directory
148
+ and it has a muD of 2.5 then the command would be ::
149
+
150
+ labpdfproc 2.5 zro2_mo.xy
151
+
152
+ Please type ::
153
+
154
+ labpdfproc --help
155
+
156
+ for more information on the available options.
157
+
117
158
  Support and Contribute
118
159
  ----------------------
119
160
 
120
161
  `Diffpy user group <https://groups.google.com/g/diffpy-users>`_ is the discussion forum for general questions and discussions about the use of diffpy.labpdfproc. Please join the diffpy.labpdfproc users community by joining the Google group. The diffpy.labpdfproc project welcomes your expertise and enthusiasm!
121
162
 
122
- If you see a bug or want to request a feature, please `report it as an issue <https://github.com/diffpy/diffpy.labpdfproc/issues>`_ and/or `submit a fix as a PR <https://github.com/diffpy/diffpy.labpdfproc/pulls>`_. You can also post it to the `Diffpy user group <https://groups.google.com/g/diffpy-users>`_.
163
+ If you see a bug or want to request a feature, please `report it as an issue <https://github.com/diffpy/diffpy.labpdfproc/issues>`_ and/or `submit a fix as a PR <https://github.com/diffpy/diffpy.labpdfproc/pulls>`_. You can also post it to the `Diffpy user group <https://groups.google.com/g/diffpy-users>`_.
123
164
 
124
165
  Feel free to fork the project and contribute. To install diffpy.labpdfproc
125
166
  in a development mode, with its sources being directly used by Python
@@ -142,7 +183,7 @@ trying to commit again.
142
183
 
143
184
  Improvements and fixes are always appreciated.
144
185
 
145
- Before contribuing, please read our `Code of Conduct <https://github.com/diffpy/diffpy.labpdfproc/blob/main/CODE_OF_CONDUCT.rst>`_.
186
+ Before contributing, please read our `Code of Conduct <https://github.com/diffpy/diffpy.labpdfproc/blob/main/CODE_OF_CONDUCT.rst>`_.
146
187
 
147
188
  Contact
148
189
  -------
@@ -15,8 +15,8 @@
15
15
  .. |Black| image:: https://img.shields.io/badge/code_style-black-black
16
16
  :target: https://github.com/psf/black
17
17
 
18
- .. |CI| image:: https://github.com/diffpy/diffpy.labpdfproc/actions/workflows/main.yml/badge.svg
19
- :target: https://github.com/diffpy/diffpy.labpdfproc/actions/workflows/main.yml
18
+ .. |CI| image:: https://github.com/diffpy/diffpy.labpdfproc/actions/workflows/matrix-and-codecov-on-merge-to-main.yml/badge.svg
19
+ :target: https://github.com/diffpy/diffpy.labpdfproc/actions/workflows/matrix-and-codecov-on-merge-to-main.yml
20
20
 
21
21
  .. |Codecov| image:: https://codecov.io/gh/diffpy/diffpy.labpdfproc/branch/main/graph/badge.svg
22
22
  :target: https://codecov.io/gh/diffpy/diffpy.labpdfproc
@@ -35,9 +35,30 @@
35
35
  .. |Tracking| image:: https://img.shields.io/badge/issue_tracking-github-blue
36
36
  :target: https://github.com/diffpy/diffpy.labpdfproc/issues
37
37
 
38
- Tools for processing x-ray powder diffraction data from laboratory sources
38
+ Tools for processing x-ray powder diffraction data from laboratory sources.
39
39
 
40
- * LONGER DESCRIPTION HERE
40
+ PDFgetX3 has revolutionized how PDF methods can be applied to solve nanostructure problems.
41
+ However, the program was designed for use with Rapid Acquisition PDF (RAPDF) data from synchrotron sources.
42
+ A key approximation inherent in the use of PDFgetX3 for RAPDF data is that absorption effects are negligible.
43
+ This is typically not the case for laboratory x-ray diffractometers, where absorption effects can be significant.
44
+
45
+ This app is designed to preprocess data from laboratory x-ray diffractometers before using PDFgetX3 to obtain PDFs.
46
+ The app currently carries out an absorption correction assuming a parallel beam capillary geometry
47
+ which is the most common geometry for lab PDF measurements.
48
+
49
+ The theory is described in the following paper:
50
+
51
+ An ad hoc Absorption Correction for Reliable
52
+ Pair-Distribution Functions from Low Energy x-ray Sources,
53
+ Yucong Chen, Till Schertenleib, Andrew Yang, Pascal Schouwink,
54
+ Wendy L. Queen and Simon J. L. Billinge, in preparation.
55
+
56
+ The related experimental data acquisition protocols are described in the following paper:
57
+
58
+ Protocols for Obtaining Reliable PDFs from Laboratory
59
+ x-ray Sources Using PDFgetX3,
60
+ Till Schertenleib, Daniel Schmuckler, Yucong Chen, Geng Bang Jin,
61
+ Wendy L. Queen and Simon J. L. Billinge, in preparation.
41
62
 
42
63
  For more information about the diffpy.labpdfproc library, please consult our `online documentation <https://diffpy.github.io/diffpy.labpdfproc>`_.
43
64
 
@@ -71,11 +92,7 @@ Then, to fully install ``diffpy.labpdfproc`` in our active environment, run ::
71
92
 
72
93
  Another option is to use ``pip`` to download and install the latest release from
73
94
  `Python Package Index <https://pypi.python.org>`_.
74
- To install using ``pip`` into your ``diffpy.labpdfproc_env`` environment, we will also have to install dependencies ::
75
-
76
- pip install -r https://raw.githubusercontent.com/diffpy/diffpy.labpdfproc/main/requirements/run.txt
77
-
78
- and then install the package ::
95
+ To install using ``pip`` into your ``diffpy.labpdfproc_env`` environment, type ::
79
96
 
80
97
  pip install diffpy.labpdfproc
81
98
 
@@ -85,12 +102,33 @@ and run the following ::
85
102
 
86
103
  pip install .
87
104
 
105
+ Example
106
+ -------
107
+
108
+ Navigate to the directory that contains 1D diffraction patterns that you would like to process.
109
+ Activate the conda environment (`conda activate diffpy.labpdfproc_env`) that contains the package and run the following command ::
110
+
111
+ labpdfproc <muD> <path/to/inputfile.txt>
112
+
113
+ Here replace <muD> with the value of muD for your sample
114
+ and <path/to/inputfile.txt> with the path and filename of your input file.
115
+ For example, if the uncorrected data case is called zro2_mo.xy and is in the current directory
116
+ and it has a muD of 2.5 then the command would be ::
117
+
118
+ labpdfproc 2.5 zro2_mo.xy
119
+
120
+ Please type ::
121
+
122
+ labpdfproc --help
123
+
124
+ for more information on the available options.
125
+
88
126
  Support and Contribute
89
127
  ----------------------
90
128
 
91
129
  `Diffpy user group <https://groups.google.com/g/diffpy-users>`_ is the discussion forum for general questions and discussions about the use of diffpy.labpdfproc. Please join the diffpy.labpdfproc users community by joining the Google group. The diffpy.labpdfproc project welcomes your expertise and enthusiasm!
92
130
 
93
- If you see a bug or want to request a feature, please `report it as an issue <https://github.com/diffpy/diffpy.labpdfproc/issues>`_ and/or `submit a fix as a PR <https://github.com/diffpy/diffpy.labpdfproc/pulls>`_. You can also post it to the `Diffpy user group <https://groups.google.com/g/diffpy-users>`_.
131
+ If you see a bug or want to request a feature, please `report it as an issue <https://github.com/diffpy/diffpy.labpdfproc/issues>`_ and/or `submit a fix as a PR <https://github.com/diffpy/diffpy.labpdfproc/pulls>`_. You can also post it to the `Diffpy user group <https://groups.google.com/g/diffpy-users>`_.
94
132
 
95
133
  Feel free to fork the project and contribute. To install diffpy.labpdfproc
96
134
  in a development mode, with its sources being directly used by Python
@@ -113,7 +151,7 @@ trying to commit again.
113
151
 
114
152
  Improvements and fixes are always appreciated.
115
153
 
116
- Before contribuing, please read our `Code of Conduct <https://github.com/diffpy/diffpy.labpdfproc/blob/main/CODE_OF_CONDUCT.rst>`_.
154
+ Before contributing, please read our `Code of Conduct <https://github.com/diffpy/diffpy.labpdfproc/blob/main/CODE_OF_CONDUCT.rst>`_.
117
155
 
118
156
  Contact
119
157
  -------
@@ -0,0 +1,6 @@
1
+ name: diffpy.labpdfproc
2
+ channels:
3
+ - conda-forge
4
+ dependencies:
5
+ - python=3
6
+ - pip
@@ -1,17 +1,17 @@
1
1
  [build-system]
2
- requires = ["setuptools>=62.0", "setuptools-git-versioning<2"]
2
+ requires = ["setuptools>=62.0", "setuptools-git-versioning>=2.0"]
3
3
  build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "diffpy.labpdfproc"
7
- dynamic=['version']
7
+ dynamic=['version', 'dependencies']
8
8
  authors = [
9
9
  { name="Simon J.L. Billinge group", email="simon.billinge@gmail.com" },
10
10
  ]
11
11
  maintainers = [
12
12
  { name="Simon J.L. Billinge group", email="simon.billinge@gmail.com" },
13
13
  ]
14
- description = "Tools for processing x-ray powder diffraction data from laboratory sources"
14
+ description = "Tools for processing x-ray powder diffraction data from laboratory sources."
15
15
  keywords = ['powder xrd', 'absorption correction', 'pdf', 'diffpy']
16
16
  readme = "README.rst"
17
17
  requires-python = ">=3.10"
@@ -42,12 +42,18 @@ template = "{tag}"
42
42
  dev_template = "{tag}"
43
43
  dirty_template = "{tag}"
44
44
 
45
+ [project.scripts]
46
+ labpdfproc = "diffpy.labpdfproc.labpdfprocapp:main"
47
+
45
48
  [tool.setuptools.packages.find]
46
49
  where = ["src"] # list of folders that contain the packages (["."] by default)
47
50
  include = ["*"] # package names should match these glob patterns (["*"] by default)
48
51
  exclude = ["diffpy.labpdfproc.tests*"] # exclude packages matching these glob patterns (empty by default)
49
52
  namespaces = false # to disable scanning PEP 420 namespaces (true by default)
50
53
 
54
+ [tool.setuptools.dynamic]
55
+ dependencies = {file = ["requirements/pip.txt"]}
56
+
51
57
  [tool.black]
52
58
  line-length = 115
53
59
  include = '\.pyi?$'
@@ -0,0 +1,11 @@
1
+ # YOU MAY DELETE THIS FILE AFTER SETTING UP DEPENDENCIES!
2
+ #
3
+ # This directory is where you should place your project dependencies.
4
+ # "pip.txt" should contain all required packages not available on conda.
5
+ # All other files should contain only packages available to download from conda.
6
+ # build.txt should contain all packages required to build (not run) the project.
7
+ # run.txt should contain all packages (including optional packages) required for a user to run the program.
8
+ # test.txt should contain all packages required for the testing suite and to ensure all tests pass.
9
+ # docs.txt should contain all packages required for building the package documentation page.
10
+ #
11
+ # YOU MAY DELETE THIS FILE AFTER SETTING UP DEPENDENCIES!
@@ -0,0 +1,2 @@
1
+ python
2
+ setuptools
@@ -0,0 +1,4 @@
1
+ numpy
2
+ diffpy.utils
3
+ pandas
4
+ scipy
@@ -0,0 +1,4 @@
1
+ sphinx
2
+ sphinx_rtd_theme
3
+ doctr
4
+ m2r
@@ -0,0 +1,4 @@
1
+ numpy
2
+ diffpy.utils
3
+ pandas
4
+ scipy
@@ -0,0 +1,20 @@
1
+ # These are required for developing the package (running the tests, building
2
+ # the documentation) but not necessarily required for _using_ it.
3
+ black
4
+ codecov
5
+ coverage
6
+ flake8
7
+ isort
8
+ nbstripout
9
+ pre-commit
10
+ pre-commit-hooks
11
+ pytest
12
+ pytest-mock
13
+ sphinx
14
+ twine
15
+ # These are dependencies of various sphinx extensions for documentation.
16
+ ipython
17
+ matplotlib
18
+ numpydoc
19
+ sphinx-copybutton
20
+ sphinx_rtd_theme
@@ -0,0 +1,7 @@
1
+ flake8
2
+ pytest
3
+ codecov
4
+ coverage
5
+ pytest-cov
6
+ pytest-env
7
+ pytest-mock
@@ -13,7 +13,7 @@
13
13
  #
14
14
  ##############################################################################
15
15
 
16
- """Tools for processing x-ray powder diffraction data from laboratory sources"""
16
+ """Tools for processing x-ray powder diffraction data from laboratory sources."""
17
17
 
18
18
  # package version
19
19
  from diffpy.labpdfproc.version import __version__
@@ -0,0 +1,5 @@
1
+ -6.543824057313183,2.517676049711881e-10,-430.98705781061807,-1390.1242894055792,-2233.6043531698424,-2624.226082870084,-2590.22123249732
2
+ 5.020666247920394,-4.676545705328227e-10,875.3743680589598,2744.521375373735,4366.230491983095,5113.620084734874,5051.51673764446
3
+ 1.8615172482459748,3.25649449911046e-10,-663.8228448830648,-2027.2101338882571,-3194.0427904869357,-3728.3876362721985,-3684.6430045258744
4
+ -1.9688714316525813,0.9999999998992586,224.64320300800793,666.0546805817288,1038.3830530062712,1207.4338980088214,1193.1790131535502
5
+ 0.9819818977427489,1.1680695590205036e-11,-28.533774174029173,-82.17596308875525,-126.6770208129477,-146.65755463691826,-144.8506009433783