xrayscatteringtools 0.2.1__tar.gz → 0.3.0__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 (45) hide show
  1. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/.gitattributes +2 -2
  2. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/LICENSE +1 -1
  3. xrayscatteringtools-0.3.0/PKG-INFO +108 -0
  4. xrayscatteringtools-0.3.0/README.md +81 -0
  5. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/pyproject.toml +1 -1
  6. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/src/xrayscatteringtools/__init__.py +3 -3
  7. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/src/xrayscatteringtools/calib/__init__.py +2 -1
  8. xrayscatteringtools-0.3.0/src/xrayscatteringtools/calib/masking.py +497 -0
  9. xrayscatteringtools-0.2.1/src/xrayscatteringtools/data/Jungfrau.h5 → xrayscatteringtools-0.3.0/src/xrayscatteringtools/data/Jungfrau4M.h5 +0 -0
  10. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/src/xrayscatteringtools/io.py +64 -6
  11. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/src/xrayscatteringtools/plotting.py +25 -0
  12. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/src/xrayscatteringtools/utils.py +45 -1
  13. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/tests/DMP_D.xyz +24 -24
  14. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/tests/DMP_L1.xyz +24 -24
  15. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/tests/DMP_L2.xyz +24 -24
  16. xrayscatteringtools-0.2.1/PKG-INFO +0 -103
  17. xrayscatteringtools-0.2.1/README.md +0 -76
  18. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/.gitignore +0 -0
  19. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/src/xrayscatteringtools/calib/data/Zn_attenuation_length.h5 +0 -0
  20. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/src/xrayscatteringtools/calib/geometry_calibration.py +0 -0
  21. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/src/xrayscatteringtools/calib/scattering_corrections.py +0 -0
  22. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/src/xrayscatteringtools/epicsArch.py +0 -0
  23. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/src/xrayscatteringtools/theory/__init__.py +0 -0
  24. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/src/xrayscatteringtools/theory/data/IAM/Compton_Factors.npy +0 -0
  25. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/src/xrayscatteringtools/theory/data/IAM/Scattering_Factors.npy +0 -0
  26. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/src/xrayscatteringtools/theory/data/geometries/SF6__CCSD_T_DHK__aug_cc_pV5Z_DK.h5 +0 -0
  27. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/src/xrayscatteringtools/theory/data/geometries/make_geometry_h5.py +0 -0
  28. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/src/xrayscatteringtools/theory/data/patterns/SF6__CCSD__aug_cc_pVDZ.h5 +0 -0
  29. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/src/xrayscatteringtools/theory/data/patterns/SF6__HF__aug_cc_pVDZ.h5 +0 -0
  30. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/src/xrayscatteringtools/theory/data/patterns/SF6__MP2__aug_cc_pVDZ.h5 +0 -0
  31. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/src/xrayscatteringtools/theory/data/patterns/convert_ab_initio_to_h5.py +0 -0
  32. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/src/xrayscatteringtools/theory/geometries.py +0 -0
  33. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/src/xrayscatteringtools/theory/geometries.pyi +0 -0
  34. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/src/xrayscatteringtools/theory/iam.py +0 -0
  35. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/src/xrayscatteringtools/theory/patterns.py +0 -0
  36. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/src/xrayscatteringtools/theory/patterns.pyi +0 -0
  37. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/tests/DMP_ground.xyz +0 -0
  38. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/tests/__init__.py +0 -0
  39. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/tests/azav_test.ipynb +0 -0
  40. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/tests/calib_test.ipynb +0 -0
  41. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/tests/geometries_test.ipynb +0 -0
  42. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/tests/iam_oriented_test.ipynb +0 -0
  43. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/tests/iam_pattern_test.ipynb +0 -0
  44. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/tests/patterns_test.ipynb +0 -0
  45. {xrayscatteringtools-0.2.1 → xrayscatteringtools-0.3.0}/tests/sf6_test.xyz +0 -0
@@ -1,2 +1,2 @@
1
- # Auto detect text files and perform LF normalization
2
- * text=auto
1
+ # Auto detect text files and perform LF normalization
2
+ * text=auto
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
21
+ SOFTWARE.
@@ -0,0 +1,108 @@
1
+ Metadata-Version: 2.4
2
+ Name: xrayscatteringtools
3
+ Version: 0.3.0
4
+ Summary: A library for gas phase analysis at the CXI endstation
5
+ Project-URL: Homepage, https://github.com/Weber-Group/xrayscatteringtools
6
+ Project-URL: Issues, https://github.com/Weber-Group/xrayscatteringtools/issues
7
+ Author-email: David Romano <david_j_romano@brown.edu>
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Requires-Python: >=3.9
11
+ Requires-Dist: h5py
12
+ Requires-Dist: ipython
13
+ Requires-Dist: matplotlib
14
+ Requires-Dist: numpy<2
15
+ Requires-Dist: pathlib
16
+ Requires-Dist: pyyaml
17
+ Requires-Dist: requests
18
+ Requires-Dist: scipy>=1.11
19
+ Requires-Dist: tqdm
20
+ Requires-Dist: xraylib
21
+ Provides-Extra: dev
22
+ Requires-Dist: black>=24.0; extra == 'dev'
23
+ Requires-Dist: mypy>=1.9; extra == 'dev'
24
+ Requires-Dist: pytest>=8.0; extra == 'dev'
25
+ Requires-Dist: ruff>=0.3; extra == 'dev'
26
+ Description-Content-Type: text/markdown
27
+
28
+ # X-Ray Scattering Tools
29
+
30
+ `xrayscatteringtools` is a Python library designed for advanced X-ray scattering data analysis. It provides tools for data processing, visualization, calibration, and theoretical modeling. Specifically, it works alongside the [CXI-Template](https://github.com/Weber-Group/CXI-Template) repository for analyzing data from the Linac Coherent Light Source's Coherent X-ray Imaging hutch.
31
+
32
+ ## Features
33
+
34
+ - **Data I/O**: Read and write various data formats, including `.xyz` and `.mol` files, and handle experimental data stored in HDF5.
35
+ - **Visualization**: Generate plots for detector data.
36
+ - **Calibration**: Perform geometry calibration and create masks for X-ray scattering experiments.
37
+ - **Theoretical Modeling**: Compute scattering patterns using theoretical models and atomic data.
38
+ - **Utilities**: A collection of helper functions for unit conversions, azimuthal binning, and more.
39
+
40
+ ---
41
+
42
+ ## Installation
43
+
44
+ To install the latest version, use pip:
45
+ ```bash
46
+ pip install xrayscatteringtools
47
+ ```
48
+
49
+ or install manually
50
+ ```bash
51
+ git clone https://github.com/Weber-Group/xrayscatteringtools.git
52
+ cd xrayscatteringtools
53
+ pip install -r requirements.txt
54
+ ```
55
+
56
+ ---
57
+
58
+ ## Modules Overview
59
+
60
+ ### 1. `xrayscatteringtools.io`
61
+ Handles data input and output operations:
62
+ - **Key Functions**:
63
+ - `combineRuns`: Combine data from multiple experimental runs.
64
+ - `read_xyz`, `write_xyz`: Read and write `.xyz` files.
65
+ - `get_data_paths`: Retrieve paths to data files.
66
+ - `get_config`: Load configuration files for experiments.
67
+
68
+ ### 2. `xrayscatteringtools.plotting`
69
+ Provides tools for visualizing X-ray scattering data:
70
+ - **Key Functions**:
71
+ - `plot_j4m`: Plot Jungfrau 4M detector data.
72
+
73
+ ### 3. `xrayscatteringtools.utils`
74
+ A collection of utility functions:
75
+ - **Key Functions**
76
+ - Unit conversions, azimuthal binning, transformations, ipython ease-of-use.
77
+
78
+ ### 4. `xrayscatteringtools.calib`
79
+ Tools for calibration and masking:
80
+ - **Submodules**:
81
+ - `geometry_calibration`: Perform geometry calibration using theoretical scattering patterns.
82
+ - `masking`: Create and manage masks for X-ray scattering data.
83
+ - `scattering_corrections`: Compute correction factors for scattering experiments.
84
+
85
+ ### 5. `xrayscatteringtools.theory`
86
+ Theoretical modeling of X-ray scattering:
87
+ - **Submodules**:
88
+ - `geometries`: Load and manage molecular geometries from HDF5 files.
89
+ - `iam`: Compute elastic X-ray scattering patterns using the Independent Atom Model (IAM).
90
+ - `patterns` : Load and manage _ab initio_ scattering data from HDF5 files.
91
+
92
+ ---
93
+
94
+ ## Contributing
95
+
96
+ Contributions are welcome! Please fork the repository and submit a pull request with your changes.
97
+
98
+ ---
99
+
100
+ ## License
101
+
102
+ This project is licensed under the MIT License. See the `LICENSE` file for details.
103
+
104
+ ---
105
+
106
+ ## Acknowledgments
107
+
108
+ This library was created by [David J. Romano](https://www.linkedin.com/in/david-romano-231124196) based of compiling and standardizing code from previous data analysis piplines. Maintained by the [Weber Research Group](https://sites.brown.edu/weber-lab/) and developed by collaborators to facilitate X-ray scattering research.
@@ -0,0 +1,81 @@
1
+ # X-Ray Scattering Tools
2
+
3
+ `xrayscatteringtools` is a Python library designed for advanced X-ray scattering data analysis. It provides tools for data processing, visualization, calibration, and theoretical modeling. Specifically, it works alongside the [CXI-Template](https://github.com/Weber-Group/CXI-Template) repository for analyzing data from the Linac Coherent Light Source's Coherent X-ray Imaging hutch.
4
+
5
+ ## Features
6
+
7
+ - **Data I/O**: Read and write various data formats, including `.xyz` and `.mol` files, and handle experimental data stored in HDF5.
8
+ - **Visualization**: Generate plots for detector data.
9
+ - **Calibration**: Perform geometry calibration and create masks for X-ray scattering experiments.
10
+ - **Theoretical Modeling**: Compute scattering patterns using theoretical models and atomic data.
11
+ - **Utilities**: A collection of helper functions for unit conversions, azimuthal binning, and more.
12
+
13
+ ---
14
+
15
+ ## Installation
16
+
17
+ To install the latest version, use pip:
18
+ ```bash
19
+ pip install xrayscatteringtools
20
+ ```
21
+
22
+ or install manually
23
+ ```bash
24
+ git clone https://github.com/Weber-Group/xrayscatteringtools.git
25
+ cd xrayscatteringtools
26
+ pip install -r requirements.txt
27
+ ```
28
+
29
+ ---
30
+
31
+ ## Modules Overview
32
+
33
+ ### 1. `xrayscatteringtools.io`
34
+ Handles data input and output operations:
35
+ - **Key Functions**:
36
+ - `combineRuns`: Combine data from multiple experimental runs.
37
+ - `read_xyz`, `write_xyz`: Read and write `.xyz` files.
38
+ - `get_data_paths`: Retrieve paths to data files.
39
+ - `get_config`: Load configuration files for experiments.
40
+
41
+ ### 2. `xrayscatteringtools.plotting`
42
+ Provides tools for visualizing X-ray scattering data:
43
+ - **Key Functions**:
44
+ - `plot_j4m`: Plot Jungfrau 4M detector data.
45
+
46
+ ### 3. `xrayscatteringtools.utils`
47
+ A collection of utility functions:
48
+ - **Key Functions**
49
+ - Unit conversions, azimuthal binning, transformations, ipython ease-of-use.
50
+
51
+ ### 4. `xrayscatteringtools.calib`
52
+ Tools for calibration and masking:
53
+ - **Submodules**:
54
+ - `geometry_calibration`: Perform geometry calibration using theoretical scattering patterns.
55
+ - `masking`: Create and manage masks for X-ray scattering data.
56
+ - `scattering_corrections`: Compute correction factors for scattering experiments.
57
+
58
+ ### 5. `xrayscatteringtools.theory`
59
+ Theoretical modeling of X-ray scattering:
60
+ - **Submodules**:
61
+ - `geometries`: Load and manage molecular geometries from HDF5 files.
62
+ - `iam`: Compute elastic X-ray scattering patterns using the Independent Atom Model (IAM).
63
+ - `patterns` : Load and manage _ab initio_ scattering data from HDF5 files.
64
+
65
+ ---
66
+
67
+ ## Contributing
68
+
69
+ Contributions are welcome! Please fork the repository and submit a pull request with your changes.
70
+
71
+ ---
72
+
73
+ ## License
74
+
75
+ This project is licensed under the MIT License. See the `LICENSE` file for details.
76
+
77
+ ---
78
+
79
+ ## Acknowledgments
80
+
81
+ This library was created by [David J. Romano](https://www.linkedin.com/in/david-romano-231124196) based of compiling and standardizing code from previous data analysis piplines. Maintained by the [Weber Research Group](https://sites.brown.edu/weber-lab/) and developed by collaborators to facilitate X-ray scattering research.
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "xrayscatteringtools"
7
- version = "0.2.1"
7
+ version = "0.3.0"
8
8
  description = "A library for gas phase analysis at the CXI endstation"
9
9
  authors = [
10
10
  { name = "David Romano", email = "david_j_romano@brown.edu" }
@@ -1,5 +1,5 @@
1
- from .io import combineRuns, get_leaves, read_xyz, write_xyz, read_mol, get_data_paths
2
- from .plotting import plot_jungfrau, compute_pixel_edges
3
- from .utils import enable_underscore_cleanup, azimuthalBinning, au2invAngstroms, invAngstroms2au, keV2Angstroms, Angstroms2keV, q2theta, theta2q, element_number_to_symbol, element_symbol_to_number, translate_molecule, rotate_molecule, J4M
1
+ from .io import combineRuns, get_leaves, read_xyz, write_xyz, read_mol, get_data_paths, get_config_for_runs, get_config
2
+ from .plotting import plot_j4m, plot_jungfrau, compute_pixel_edges
3
+ from .utils import enable_underscore_cleanup, azimuthalBinning, au2invAngstroms, invAngstroms2au, keV2Angstroms, Angstroms2keV, q2theta, theta2q, element_number_to_symbol, element_symbol_to_number, translate_molecule, rotate_molecule, J4M, compress_ranges
4
4
  from . import theory
5
5
  from . import calib
@@ -1,2 +1,3 @@
1
1
  from .geometry_calibration import run_geometry_calibration, model
2
- from .scattering_corrections import correction_factor, J4M_efficiency
2
+ from .scattering_corrections import correction_factor, J4M_efficiency
3
+ from .masking import mask_maker