pdfbl.sequential 0.1.0__py3-none-any.whl
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.
- pdfbl/__init__.py +14 -0
- pdfbl/sequential/__init__.py +23 -0
- pdfbl/sequential/pdfadapter.py +470 -0
- pdfbl/sequential/pdfbl_sequential_app.py +25 -0
- pdfbl/sequential/sequential_cmi_runner.py +556 -0
- pdfbl/sequential/version.py +26 -0
- pdfbl_sequential-0.1.0.dist-info/METADATA +190 -0
- pdfbl_sequential-0.1.0.dist-info/RECORD +13 -0
- pdfbl_sequential-0.1.0.dist-info/WHEEL +5 -0
- pdfbl_sequential-0.1.0.dist-info/entry_points.txt +2 -0
- pdfbl_sequential-0.1.0.dist-info/licenses/AUTHORS.rst +10 -0
- pdfbl_sequential-0.1.0.dist-info/licenses/LICENSE.rst +29 -0
- pdfbl_sequential-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pdfbl.sequential
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Automated sequential refinements of PDF data
|
|
5
|
+
Author-email: Simon Billinge <sb2896@columbia.edu>
|
|
6
|
+
Maintainer-email: Simon Billinge <sb2896@columbia.edu>
|
|
7
|
+
Project-URL: Homepage, https://github.com/pdf-bl/pdfbl.sequential/
|
|
8
|
+
Project-URL: Issues, https://github.com/pdf-bl/pdfbl.sequential/issues/
|
|
9
|
+
Keywords: diffraction,PDF,X-ray,neutron,nsls-ii
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
15
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
16
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
17
|
+
Classifier: Operating System :: POSIX
|
|
18
|
+
Classifier: Operating System :: Unix
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
24
|
+
Requires-Python: <3.14,>=3.11
|
|
25
|
+
Description-Content-Type: text/x-rst
|
|
26
|
+
License-File: LICENSE.rst
|
|
27
|
+
License-File: AUTHORS.rst
|
|
28
|
+
Requires-Dist: numpy
|
|
29
|
+
Requires-Dist: scipy
|
|
30
|
+
Requires-Dist: prompt_toolkit
|
|
31
|
+
Requires-Dist: bg-mpl-stylesheets
|
|
32
|
+
Requires-Dist: psutil
|
|
33
|
+
Requires-Dist: matplotlib
|
|
34
|
+
Dynamic: license-file
|
|
35
|
+
|
|
36
|
+
|Icon| |title|_
|
|
37
|
+
===============
|
|
38
|
+
|
|
39
|
+
.. |title| replace:: pdfbl.sequential
|
|
40
|
+
.. _title: https://pdf-bl.github.io/pdfbl.sequential
|
|
41
|
+
|
|
42
|
+
.. |Icon| image:: https://avatars.githubusercontent.com/pdf-bl
|
|
43
|
+
:target: https://pdf-bl.github.io/pdfbl.sequential
|
|
44
|
+
:height: 100px
|
|
45
|
+
|
|
46
|
+
|PyPI| |Forge| |PythonVersion| |PR|
|
|
47
|
+
|
|
48
|
+
|CI| |Codecov| |Black| |Tracking|
|
|
49
|
+
|
|
50
|
+
.. |Black| image:: https://img.shields.io/badge/code_style-black-black
|
|
51
|
+
:target: https://github.com/psf/black
|
|
52
|
+
|
|
53
|
+
.. |CI| image:: https://github.com/pdf-bl/pdfbl.sequential/actions/workflows/matrix-and-codecov-on-merge-to-main.yml/badge.svg
|
|
54
|
+
:target: https://github.com/pdf-bl/pdfbl.sequential/actions/workflows/matrix-and-codecov-on-merge-to-main.yml
|
|
55
|
+
|
|
56
|
+
.. |Codecov| image:: https://codecov.io/gh/pdf-bl/pdfbl.sequential/branch/main/graph/badge.svg
|
|
57
|
+
:target: https://codecov.io/gh/pdf-bl/pdfbl.sequential
|
|
58
|
+
|
|
59
|
+
.. |Forge| image:: https://img.shields.io/conda/vn/conda-forge/pdfbl.sequential
|
|
60
|
+
:target: https://anaconda.org/conda-forge/pdfbl.sequential
|
|
61
|
+
|
|
62
|
+
.. |PR| image:: https://img.shields.io/badge/PR-Welcome-29ab47ff
|
|
63
|
+
:target: https://github.com/pdf-bl/pdfbl.sequential/pulls
|
|
64
|
+
|
|
65
|
+
.. |PyPI| image:: https://img.shields.io/pypi/v/pdfbl.sequential
|
|
66
|
+
:target: https://pypi.org/project/pdfbl.sequential/
|
|
67
|
+
|
|
68
|
+
.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/pdfbl.sequential
|
|
69
|
+
:target: https://pypi.org/project/pdfbl.sequential/
|
|
70
|
+
|
|
71
|
+
.. |Tracking| image:: https://img.shields.io/badge/issue_tracking-github-blue
|
|
72
|
+
:target: https://github.com/pdf-bl/pdfbl.sequential/issues
|
|
73
|
+
|
|
74
|
+
Automated sequential refinements of PDF data
|
|
75
|
+
|
|
76
|
+
Scripts for running sequential PDF refinements using diffpy.cmi automatically
|
|
77
|
+
|
|
78
|
+
For more information about the pdfbl.sequential library, please consult our `online documentation <https://pdf-bl.github.io/pdfbl.sequential>`_.
|
|
79
|
+
|
|
80
|
+
Citation
|
|
81
|
+
--------
|
|
82
|
+
|
|
83
|
+
If you use pdfbl.sequential in a scientific publication, we would like you to cite this package as
|
|
84
|
+
|
|
85
|
+
pdfbl.sequential Package, https://github.com/pdf-bl/pdfbl.sequential
|
|
86
|
+
|
|
87
|
+
Installation
|
|
88
|
+
------------
|
|
89
|
+
|
|
90
|
+
The preferred method is to use `Miniconda Python
|
|
91
|
+
<https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html>`_
|
|
92
|
+
and install from the "conda-forge" channel of Conda packages.
|
|
93
|
+
|
|
94
|
+
To add "conda-forge" to the conda channels, run the following in a terminal. ::
|
|
95
|
+
|
|
96
|
+
conda config --add channels conda-forge
|
|
97
|
+
|
|
98
|
+
We want to install our packages in a suitable conda environment.
|
|
99
|
+
The following creates and activates a new environment named ``pdfbl.sequential_env`` ::
|
|
100
|
+
|
|
101
|
+
conda create -n pdfbl.sequential_env pdfbl.sequential
|
|
102
|
+
conda activate pdfbl.sequential_env
|
|
103
|
+
|
|
104
|
+
The output should print the latest version displayed on the badges above.
|
|
105
|
+
|
|
106
|
+
You can also use ``pip`` to download and install the latest release from
|
|
107
|
+
`Python Package Index <https://pypi.python.org>`_ in your environment.
|
|
108
|
+
But you would still need to install the dependency ``diffpy.cmi`` using
|
|
109
|
+
``conda`` first ::
|
|
110
|
+
|
|
111
|
+
conda install diffpy.cmi
|
|
112
|
+
pip install pdfbl.sequential
|
|
113
|
+
|
|
114
|
+
If you prefer to install from sources, after installing the dependencies, obtain the source archive from
|
|
115
|
+
`GitHub <https://github.com/pdf-bl/pdfbl.sequential/>`_. Once installed, ``cd`` into your ``pdfbl.sequential`` directory
|
|
116
|
+
and run the following ::
|
|
117
|
+
|
|
118
|
+
conda install diffpy.cmi
|
|
119
|
+
pip install .
|
|
120
|
+
|
|
121
|
+
This package also provides command-line utilities. To check the software has been installed correctly, type ::
|
|
122
|
+
|
|
123
|
+
pdfbl.sequential --version
|
|
124
|
+
|
|
125
|
+
You can also type the following command to verify the installation. ::
|
|
126
|
+
|
|
127
|
+
python -c "import pdfbl.sequential; print(pdfbl.sequential.__version__)"
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
To view the basic usage and available commands, type ::
|
|
131
|
+
|
|
132
|
+
pdfbl.sequential -h
|
|
133
|
+
|
|
134
|
+
Examples
|
|
135
|
+
--------
|
|
136
|
+
|
|
137
|
+
To run a temperature sequential refinement, ::
|
|
138
|
+
|
|
139
|
+
from pdfbl.sequential.sequential_cmi_runner import SequentialCMIRunner
|
|
140
|
+
runner = SequentialCMIRunner()
|
|
141
|
+
runner.load_inputs(
|
|
142
|
+
input_data_dir="path/to/inputs",
|
|
143
|
+
output_result_dir="path/to/outputs",
|
|
144
|
+
structure_path="path/to/structure.cif",
|
|
145
|
+
filename_order_pattern=r"(\d+)K\.gr", # regex pattern to extract the temperature from the filename
|
|
146
|
+
)
|
|
147
|
+
runner.run(mode="batch") # or mode="stream" for running sequentially as data becomes available
|
|
148
|
+
|
|
149
|
+
Getting Started
|
|
150
|
+
---------------
|
|
151
|
+
|
|
152
|
+
You may consult our `online documentation <https://pdf-bl.github.io/pdfbl.sequential>`_ for tutorials and API references.
|
|
153
|
+
|
|
154
|
+
Support and Contribute
|
|
155
|
+
----------------------
|
|
156
|
+
|
|
157
|
+
If you see a bug or want to request a feature, please `report it as an issue <https://github.com/pdf-bl/pdfbl.sequential/issues>`_ and/or `submit a fix as a PR <https://github.com/pdf-bl/pdfbl.sequential/pulls>`_.
|
|
158
|
+
|
|
159
|
+
Feel free to fork the project and contribute. To install pdfbl.sequential
|
|
160
|
+
in a development mode, with its sources being directly used by Python
|
|
161
|
+
rather than copied to a package directory, use the following in the root
|
|
162
|
+
directory ::
|
|
163
|
+
|
|
164
|
+
pip install -e .
|
|
165
|
+
|
|
166
|
+
To ensure code quality and to prevent accidental commits into the default branch, please set up the use of our pre-commit
|
|
167
|
+
hooks.
|
|
168
|
+
|
|
169
|
+
1. Install pre-commit in your working environment by running ``conda install pre-commit``.
|
|
170
|
+
|
|
171
|
+
2. Initialize pre-commit (one time only) ``pre-commit install``.
|
|
172
|
+
|
|
173
|
+
Thereafter your code will be linted by black and isort and checked against flake8 before you can commit.
|
|
174
|
+
If it fails by black or isort, just rerun and it should pass (black and isort will modify the files so should
|
|
175
|
+
pass after they are modified). If the flake8 test fails please see the error messages and fix them manually before
|
|
176
|
+
trying to commit again.
|
|
177
|
+
|
|
178
|
+
Improvements and fixes are always appreciated.
|
|
179
|
+
|
|
180
|
+
Before contributing, please read our `Code of Conduct <https://github.com/pdf-bl/pdfbl.sequential/blob/main/CODE-OF-CONDUCT.rst>`_.
|
|
181
|
+
|
|
182
|
+
Contact
|
|
183
|
+
-------
|
|
184
|
+
|
|
185
|
+
For more information on pdfbl.sequential please visit the project `web-page <https://pdf-bl.github.io/>`_ or email Simon Billinge at sb2896@columbia.edu.
|
|
186
|
+
|
|
187
|
+
Acknowledgements
|
|
188
|
+
----------------
|
|
189
|
+
|
|
190
|
+
``pdfbl.sequential`` is built and maintained with `scikit-package <https://scikit-package.github.io/scikit-package/>`_.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
pdfbl/__init__.py,sha256=OQGLzzFXqkhKIP-uxtsAEhZw30U9Eq14fnMwnCUjA3M,530
|
|
2
|
+
pdfbl/sequential/__init__.py,sha256=NV4nr2fA5UsHHjotDZ3pOWZ39ItmQzk-mO6RdBs4gqQ,702
|
|
3
|
+
pdfbl/sequential/pdfadapter.py,sha256=ypLH8ydaS6wLMc_bav_Yc21j680sEkpesTLhMCsvzhU,17481
|
|
4
|
+
pdfbl/sequential/pdfbl_sequential_app.py,sha256=6KDYfBAjbRky_9ooigGJTbGOfgDRmBN5pyoexaTxATU,572
|
|
5
|
+
pdfbl/sequential/sequential_cmi_runner.py,sha256=lay05OsmWXUG5350rdf75zcNADIEi_ByyuQc4V8I3Jw,23377
|
|
6
|
+
pdfbl/sequential/version.py,sha256=2rmXHJH9IzYhXpzq9dCsYzIHOT1oC4U10Wd00mmj-wg,894
|
|
7
|
+
pdfbl_sequential-0.1.0.dist-info/licenses/AUTHORS.rst,sha256=2jH0ypi3P2ZuJgv9KZEblYiQTPHyu9cT_jVkYj9ip4I,200
|
|
8
|
+
pdfbl_sequential-0.1.0.dist-info/licenses/LICENSE.rst,sha256=r0DOaoezNuZvD3yiowak4UhhTqTQDxeYhAzt6gOG3jM,1523
|
|
9
|
+
pdfbl_sequential-0.1.0.dist-info/METADATA,sha256=hRnERJU_i-77sgQnLQeoO-E9KCfVZmv7zdd7vfCzKLc,7526
|
|
10
|
+
pdfbl_sequential-0.1.0.dist-info/WHEEL,sha256=YCfwYGOYMi5Jhw2fU4yNgwErybb2IX5PEwBKV4ZbdBo,91
|
|
11
|
+
pdfbl_sequential-0.1.0.dist-info/entry_points.txt,sha256=EwyheFjtkSEpCt-ndET1mpPzMjwp7p-KcYruJYQWB_0,80
|
|
12
|
+
pdfbl_sequential-0.1.0.dist-info/top_level.txt,sha256=rhhQf1P9sizprwJb29Jj8FH2WUgYMxp4viI8aIGRBh0,6
|
|
13
|
+
pdfbl_sequential-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025, Simon Billinge.
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
3. Neither the name of the copyright holder nor the names of its contributors
|
|
17
|
+
may be used to endorse or promote products derived from this software
|
|
18
|
+
without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
24
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
25
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
26
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
27
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
28
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pdfbl
|