xrayscatteringtools 1.0.2__tar.gz → 1.2.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.
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/PKG-INFO +21 -13
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/README.md +18 -11
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/pyproject.toml +3 -2
- xrayscatteringtools-1.2.0/src/xrayscatteringtools/__init__.py +6 -0
- xrayscatteringtools-1.2.0/src/xrayscatteringtools/azimuthal.py +561 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/src/xrayscatteringtools/calib/geometry_calibration.py +73 -36
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/src/xrayscatteringtools/calib/masking.py +28 -12
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/src/xrayscatteringtools/calib/scattering_corrections.py +87 -98
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/src/xrayscatteringtools/data/Jungfrau4M.h5 +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/src/xrayscatteringtools/io.py +2 -0
- xrayscatteringtools-1.2.0/src/xrayscatteringtools/theory/__init__.py +10 -0
- xrayscatteringtools-1.2.0/src/xrayscatteringtools/theory/data/patterns/NBD__CCSD_FC__aug_cc_pVDZ.h5 +0 -0
- xrayscatteringtools-1.2.0/src/xrayscatteringtools/theory/data/patterns/NBD__HF__cc_pVTZ.h5 +0 -0
- xrayscatteringtools-1.2.0/src/xrayscatteringtools/theory/data/patterns/Ne__CCSD_X2C__aug_cc_pVDZ_DK.h5 +0 -0
- xrayscatteringtools-1.2.0/src/xrayscatteringtools/theory/data/patterns/Ne__CCSD_X2C__aug_cc_pVQZ_DK.h5 +0 -0
- xrayscatteringtools-1.2.0/src/xrayscatteringtools/theory/data/patterns/Ne__CCSD_X2C__aug_cc_pVTZ_DK.h5 +0 -0
- xrayscatteringtools-1.2.0/src/xrayscatteringtools/theory/data/patterns/QC__CCSD_FC__aug_cc_pVDZ.h5 +0 -0
- xrayscatteringtools-1.2.0/src/xrayscatteringtools/theory/data/patterns/QC__HF__cc_pVTZ.h5 +0 -0
- xrayscatteringtools-1.2.0/src/xrayscatteringtools/theory/data/patterns/SF6__CCSD_FC__aug_cc_pVDZ.h5 +0 -0
- xrayscatteringtools-1.2.0/src/xrayscatteringtools/theory/data/patterns/SF6__CCSD_FC__aug_cc_pVTZ.h5 +0 -0
- xrayscatteringtools-1.2.0/src/xrayscatteringtools/theory/data/patterns/SF6__HF__cc_pVTZ.h5 +0 -0
- xrayscatteringtools-1.2.0/src/xrayscatteringtools/theory/data/patterns/convert_ab_initio_to_h5.py +46 -0
- xrayscatteringtools-1.2.0/src/xrayscatteringtools/theory/data/patterns/convert_thistle_to_h5.py +67 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/src/xrayscatteringtools/theory/iam.py +28 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/src/xrayscatteringtools/theory/patterns.py +50 -20
- xrayscatteringtools-1.2.0/src/xrayscatteringtools/theory/patterns.pyi +35 -0
- xrayscatteringtools-1.2.0/src/xrayscatteringtools/utils.py +483 -0
- xrayscatteringtools-1.2.0/tests/test_azimuthal.py +343 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/tests/test_geometry_calibration.py +133 -25
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/tests/test_masking.py +109 -9
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/tests/test_patterns.py +60 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/tests/test_scattering_corrections.py +71 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/tests/test_utils.py +43 -195
- xrayscatteringtools-1.0.2/src/xrayscatteringtools/__init__.py +0 -5
- xrayscatteringtools-1.0.2/src/xrayscatteringtools/calib/data/Zn_attenuation_length.h5 +0 -0
- xrayscatteringtools-1.0.2/src/xrayscatteringtools/calib/data/attenuation_lengths.h5 +0 -0
- xrayscatteringtools-1.0.2/src/xrayscatteringtools/theory/__init__.py +0 -7
- xrayscatteringtools-1.0.2/src/xrayscatteringtools/theory/data/patterns/convert_ab_initio_to_h5.py +0 -45
- xrayscatteringtools-1.0.2/src/xrayscatteringtools/theory/patterns.pyi +0 -19
- xrayscatteringtools-1.0.2/src/xrayscatteringtools/utils.py +0 -763
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/.gitattributes +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/.github/workflows/tests.yml +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/.gitignore +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/LICENSE +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/src/xrayscatteringtools/calib/__init__.py +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/src/xrayscatteringtools/calib/timetool_calibration.py +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/src/xrayscatteringtools/epicsArch.py +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/src/xrayscatteringtools/plotting.py +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/src/xrayscatteringtools/theory/data/IAM/Compton_Factors.npy +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/src/xrayscatteringtools/theory/data/IAM/Scattering_Factors.npy +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/src/xrayscatteringtools/theory/data/geometries/SF6__CCSD_T_DHK__aug_cc_pV5Z_DK.h5 +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/src/xrayscatteringtools/theory/data/geometries/make_geometry_h5.py +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/src/xrayscatteringtools/theory/data/patterns/SF6__CCSD__aug_cc_pVDZ.h5 +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/src/xrayscatteringtools/theory/data/patterns/SF6__HF__aug_cc_pVDZ.h5 +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/src/xrayscatteringtools/theory/data/patterns/SF6__MP2__aug_cc_pVDZ.h5 +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/src/xrayscatteringtools/theory/geometries.py +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/src/xrayscatteringtools/theory/geometries.pyi +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/tests/__init__.py +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/tests/old/DMP_D.xyz +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/tests/old/DMP_L1.xyz +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/tests/old/DMP_L2.xyz +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/tests/old/DMP_ground.xyz +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/tests/old/azav_test.ipynb +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/tests/old/calib_test.ipynb +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/tests/old/geometries_test.ipynb +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/tests/old/iam_oriented_test.ipynb +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/tests/old/iam_pattern_test.ipynb +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/tests/old/patterns_test.ipynb +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/tests/sf6_test.xyz +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/tests/test_geometries.py +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/tests/test_iam.py +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/tests/test_io.py +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/tests/test_plotting.py +0 -0
- {xrayscatteringtools-1.0.2 → xrayscatteringtools-1.2.0}/tests/test_timetool_calibration.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: xrayscatteringtools
|
|
3
|
-
Version: 1.0
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: A library for gas phase analysis at the CXI endstation
|
|
5
5
|
Project-URL: Homepage, https://github.com/Weber-Group/xrayscatteringtools
|
|
6
6
|
Project-URL: Issues, https://github.com/Weber-Group/xrayscatteringtools/issues
|
|
@@ -12,6 +12,7 @@ Requires-Dist: h5py
|
|
|
12
12
|
Requires-Dist: ipython
|
|
13
13
|
Requires-Dist: matplotlib
|
|
14
14
|
Requires-Dist: numpy
|
|
15
|
+
Requires-Dist: pyfai
|
|
15
16
|
Requires-Dist: pyyaml
|
|
16
17
|
Requires-Dist: requests
|
|
17
18
|
Requires-Dist: ruamel-yaml
|
|
@@ -37,7 +38,8 @@ Description-Content-Type: text/markdown
|
|
|
37
38
|
- **Visualization** — Plot Jungfrau 4M detector images with proper tiled geometry.
|
|
38
39
|
- **Calibration** — Geometry calibration, interactive pixel masking, per-material scattering corrections, and timetool arrival-time calibration.
|
|
39
40
|
- **Theoretical Modeling** — Compute elastic and inelastic scattering patterns via the Independent Atom Model (IAM), load _ab initio_ scattering data and optimized molecular geometries.
|
|
40
|
-
- **
|
|
41
|
+
- **Azimuthal Integration** — Momentum-transfer maps and azimuthal binning of detector images, either built-in or through [pyFAI](https://pyfai.readthedocs.io/).
|
|
42
|
+
- **Utilities** — Unit conversions (keV, Å, a.u., _q_, _θ_), molecular transformations, and element lookups.
|
|
41
43
|
|
|
42
44
|
---
|
|
43
45
|
|
|
@@ -81,32 +83,38 @@ Detector visualization:
|
|
|
81
83
|
- `plot_jungfrau` — Plot arbitrary Jungfrau panel data with custom coordinates.
|
|
82
84
|
- `compute_pixel_edges` / `edges_from_centers` — Derive pixel-edge arrays for `pcolormesh`.
|
|
83
85
|
|
|
86
|
+
### `xrayscatteringtools.azimuthal`
|
|
87
|
+
Azimuthal integration of detector images (all distances in microns, angles in degrees, energy in keV):
|
|
88
|
+
- `compute_q_map` — Per-pixel momentum transfer for a given detector geometry.
|
|
89
|
+
- `azimuthalBinning` — Bin an image into _q_ (or _r_) and optional azimuthal sectors, with polarization and solid-angle corrections.
|
|
90
|
+
- `create_J4m_integrator` — Build a pyFAI `AzimuthalIntegrator` from the real Jungfrau 4M pixel layout.
|
|
91
|
+
- `azimuthalBinning_pyfai` — pyFAI-based alternative to `azimuthalBinning` that takes the same geometry parameters. Pass a pre-built integrator (`ai=`) to reuse it across many images.
|
|
92
|
+
|
|
84
93
|
### `xrayscatteringtools.utils`
|
|
85
94
|
General-purpose utilities:
|
|
86
95
|
- **Unit conversions** — `keV2Angstroms`, `Angstroms2keV`, `au2invAngstroms`, `invAngstroms2au`, `q2theta`, `theta2q`.
|
|
87
|
-
- **Detector geometry** — `compute_q_map`, `azimuthalBinning`.
|
|
88
96
|
- **Molecular transforms** — `translate_molecule`, `rotate_molecule`.
|
|
89
97
|
- **Element lookups** — `element_symbol_to_number`, `element_number_to_symbol`.
|
|
90
|
-
- **Other** — `compress_ranges`, `enable_underscore_cleanup`, `J4M` (lazy-loaded Jungfrau 4M geometry).
|
|
98
|
+
- **Other** — `compress_ranges`, `expand_ranges`, `enable_underscore_cleanup`, `J4M` (lazy-loaded Jungfrau 4M geometry).
|
|
91
99
|
|
|
92
100
|
### `xrayscatteringtools.calib`
|
|
93
101
|
Calibration and correction tools:
|
|
94
|
-
- **`geometry_calibration`** — Fit beam center and detector distance
|
|
95
|
-
- **`masking`** — `MaskMaker` class for step-by-step pixel masking: dark, background, polygon, and per-_q_-ring sample masks.
|
|
96
|
-
- **`scattering_corrections`** — Per-material correction factors (Si, Al, Be, Kapton HN, sample cell), attenuation
|
|
102
|
+
- **`geometry_calibration`** — Fit beam center and detector distance to a theory pattern, with an optional flat background (`run_geometry_calibration`, `thompson_correction`, `geometry_correction`).
|
|
103
|
+
- **`masking`** — `MaskMaker` class for step-by-step pixel masking: dark, background, polygon, and per-_q_-ring sample masks. The detector's line and T masks are applied from the start, so known-bad pixels never enter the statistics.
|
|
104
|
+
- **`scattering_corrections`** — Per-material correction factors (Si, Al, Be, Kapton HN, sample cell), attenuation lengths from xraylib, and `J4M_efficiency`.
|
|
97
105
|
- **`timetool_calibration`** — `fast_erf_fit` for edge detection, `apply_timetool_correction` for per-shot arrival-time correction, and `add_calibration_to_yaml` for persisting calibration parameters.
|
|
98
106
|
|
|
99
107
|
### `xrayscatteringtools.theory`
|
|
100
108
|
Theoretical scattering models:
|
|
101
|
-
- **`iam`** — Independent Atom Model: isotropic and oriented elastic/inelastic scattering patterns (`iam_elastic_pattern`, `iam_inelastic_pattern`, `iam_total_pattern`, and their `_oriented` variants),
|
|
102
|
-
- **`geometries`** — Lazy-loaded optimized molecular geometries from bundled HDF5 data (accessed as module-level attributes, e.g. `geometries.
|
|
103
|
-
- **`patterns`** — Lazy-loaded _ab initio_ scattering patterns from bundled HDF5 data (accessed as module-level attributes
|
|
109
|
+
- **`iam`** — Independent Atom Model: isotropic and oriented elastic/inelastic scattering patterns (`iam_elastic_pattern`, `iam_inelastic_pattern`, `iam_total_pattern`, and their `_oriented` variants), `iam_compton_spectrum`, and `iam_inelastic_pattern_from_formula` (Compton intensity from a chemical formula alone, no coordinates needed).
|
|
110
|
+
- **`geometries`** — Lazy-loaded optimized molecular geometries from bundled HDF5 data (accessed as module-level attributes, e.g. `geometries.SF6__CCSD_T_DHK__aug_cc_pV5Z_DK`).
|
|
111
|
+
- **`patterns`** — Lazy-loaded _ab initio_ scattering patterns from bundled HDF5 data (accessed as module-level attributes named `molecule__method__basis_set`, e.g. `patterns.SF6__HF__aug_cc_pVDZ`). Available: SF6 at the HF, MP2, and CCSD levels (aug-cc-pVDZ), HF (cc-pVTZ), and frozen-core CCSD (aug-cc-pVDZ/TZ); Ne at the CCSD+X2C level (aug-cc-pVDZ/TZ/QZ+DK); and norbornadiene (`NBD`) and quadricyclane (`QC`) at HF (cc-pVTZ) and frozen-core CCSD (aug-cc-pVDZ). Every pattern has the total `I_q`; many also carry `I_q_elastic`/`I_q_inelastic`, and the newer ones add the `I_q_hartree`/`I_q_exchange`/`I_q_cumulant` decomposition. Some patterns carry a `notes` attribute with details of the calculation.
|
|
104
112
|
|
|
105
113
|
---
|
|
106
114
|
|
|
107
115
|
## Testing
|
|
108
116
|
|
|
109
|
-
The test suite uses [pytest](https://docs.pytest.org/) and covers all modules (
|
|
117
|
+
The test suite uses [pytest](https://docs.pytest.org/) and covers all modules (580+ tests):
|
|
110
118
|
```bash
|
|
111
119
|
pip install -e ".[dev]"
|
|
112
120
|
python -m pytest tests/
|
|
@@ -130,4 +138,4 @@ This project is licensed under the MIT License. See the [LICENSE](LICENSE) file
|
|
|
130
138
|
|
|
131
139
|
## Acknowledgments
|
|
132
140
|
|
|
133
|
-
This library was created by [David J. Romano](https://
|
|
141
|
+
This library was created by [David J. Romano](https://davidromano.dev) by compiling and standardizing code from previous data analysis pipelines. Maintained by the [Weber Research Group](https://sites.brown.edu/weber-lab/) and developed by collaborators to facilitate X-ray scattering research.
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
- **Visualization** — Plot Jungfrau 4M detector images with proper tiled geometry.
|
|
11
11
|
- **Calibration** — Geometry calibration, interactive pixel masking, per-material scattering corrections, and timetool arrival-time calibration.
|
|
12
12
|
- **Theoretical Modeling** — Compute elastic and inelastic scattering patterns via the Independent Atom Model (IAM), load _ab initio_ scattering data and optimized molecular geometries.
|
|
13
|
-
- **
|
|
13
|
+
- **Azimuthal Integration** — Momentum-transfer maps and azimuthal binning of detector images, either built-in or through [pyFAI](https://pyfai.readthedocs.io/).
|
|
14
|
+
- **Utilities** — Unit conversions (keV, Å, a.u., _q_, _θ_), molecular transformations, and element lookups.
|
|
14
15
|
|
|
15
16
|
---
|
|
16
17
|
|
|
@@ -54,32 +55,38 @@ Detector visualization:
|
|
|
54
55
|
- `plot_jungfrau` — Plot arbitrary Jungfrau panel data with custom coordinates.
|
|
55
56
|
- `compute_pixel_edges` / `edges_from_centers` — Derive pixel-edge arrays for `pcolormesh`.
|
|
56
57
|
|
|
58
|
+
### `xrayscatteringtools.azimuthal`
|
|
59
|
+
Azimuthal integration of detector images (all distances in microns, angles in degrees, energy in keV):
|
|
60
|
+
- `compute_q_map` — Per-pixel momentum transfer for a given detector geometry.
|
|
61
|
+
- `azimuthalBinning` — Bin an image into _q_ (or _r_) and optional azimuthal sectors, with polarization and solid-angle corrections.
|
|
62
|
+
- `create_J4m_integrator` — Build a pyFAI `AzimuthalIntegrator` from the real Jungfrau 4M pixel layout.
|
|
63
|
+
- `azimuthalBinning_pyfai` — pyFAI-based alternative to `azimuthalBinning` that takes the same geometry parameters. Pass a pre-built integrator (`ai=`) to reuse it across many images.
|
|
64
|
+
|
|
57
65
|
### `xrayscatteringtools.utils`
|
|
58
66
|
General-purpose utilities:
|
|
59
67
|
- **Unit conversions** — `keV2Angstroms`, `Angstroms2keV`, `au2invAngstroms`, `invAngstroms2au`, `q2theta`, `theta2q`.
|
|
60
|
-
- **Detector geometry** — `compute_q_map`, `azimuthalBinning`.
|
|
61
68
|
- **Molecular transforms** — `translate_molecule`, `rotate_molecule`.
|
|
62
69
|
- **Element lookups** — `element_symbol_to_number`, `element_number_to_symbol`.
|
|
63
|
-
- **Other** — `compress_ranges`, `enable_underscore_cleanup`, `J4M` (lazy-loaded Jungfrau 4M geometry).
|
|
70
|
+
- **Other** — `compress_ranges`, `expand_ranges`, `enable_underscore_cleanup`, `J4M` (lazy-loaded Jungfrau 4M geometry).
|
|
64
71
|
|
|
65
72
|
### `xrayscatteringtools.calib`
|
|
66
73
|
Calibration and correction tools:
|
|
67
|
-
- **`geometry_calibration`** — Fit beam center and detector distance
|
|
68
|
-
- **`masking`** — `MaskMaker` class for step-by-step pixel masking: dark, background, polygon, and per-_q_-ring sample masks.
|
|
69
|
-
- **`scattering_corrections`** — Per-material correction factors (Si, Al, Be, Kapton HN, sample cell), attenuation
|
|
74
|
+
- **`geometry_calibration`** — Fit beam center and detector distance to a theory pattern, with an optional flat background (`run_geometry_calibration`, `thompson_correction`, `geometry_correction`).
|
|
75
|
+
- **`masking`** — `MaskMaker` class for step-by-step pixel masking: dark, background, polygon, and per-_q_-ring sample masks. The detector's line and T masks are applied from the start, so known-bad pixels never enter the statistics.
|
|
76
|
+
- **`scattering_corrections`** — Per-material correction factors (Si, Al, Be, Kapton HN, sample cell), attenuation lengths from xraylib, and `J4M_efficiency`.
|
|
70
77
|
- **`timetool_calibration`** — `fast_erf_fit` for edge detection, `apply_timetool_correction` for per-shot arrival-time correction, and `add_calibration_to_yaml` for persisting calibration parameters.
|
|
71
78
|
|
|
72
79
|
### `xrayscatteringtools.theory`
|
|
73
80
|
Theoretical scattering models:
|
|
74
|
-
- **`iam`** — Independent Atom Model: isotropic and oriented elastic/inelastic scattering patterns (`iam_elastic_pattern`, `iam_inelastic_pattern`, `iam_total_pattern`, and their `_oriented` variants),
|
|
75
|
-
- **`geometries`** — Lazy-loaded optimized molecular geometries from bundled HDF5 data (accessed as module-level attributes, e.g. `geometries.
|
|
76
|
-
- **`patterns`** — Lazy-loaded _ab initio_ scattering patterns from bundled HDF5 data (accessed as module-level attributes
|
|
81
|
+
- **`iam`** — Independent Atom Model: isotropic and oriented elastic/inelastic scattering patterns (`iam_elastic_pattern`, `iam_inelastic_pattern`, `iam_total_pattern`, and their `_oriented` variants), `iam_compton_spectrum`, and `iam_inelastic_pattern_from_formula` (Compton intensity from a chemical formula alone, no coordinates needed).
|
|
82
|
+
- **`geometries`** — Lazy-loaded optimized molecular geometries from bundled HDF5 data (accessed as module-level attributes, e.g. `geometries.SF6__CCSD_T_DHK__aug_cc_pV5Z_DK`).
|
|
83
|
+
- **`patterns`** — Lazy-loaded _ab initio_ scattering patterns from bundled HDF5 data (accessed as module-level attributes named `molecule__method__basis_set`, e.g. `patterns.SF6__HF__aug_cc_pVDZ`). Available: SF6 at the HF, MP2, and CCSD levels (aug-cc-pVDZ), HF (cc-pVTZ), and frozen-core CCSD (aug-cc-pVDZ/TZ); Ne at the CCSD+X2C level (aug-cc-pVDZ/TZ/QZ+DK); and norbornadiene (`NBD`) and quadricyclane (`QC`) at HF (cc-pVTZ) and frozen-core CCSD (aug-cc-pVDZ). Every pattern has the total `I_q`; many also carry `I_q_elastic`/`I_q_inelastic`, and the newer ones add the `I_q_hartree`/`I_q_exchange`/`I_q_cumulant` decomposition. Some patterns carry a `notes` attribute with details of the calculation.
|
|
77
84
|
|
|
78
85
|
---
|
|
79
86
|
|
|
80
87
|
## Testing
|
|
81
88
|
|
|
82
|
-
The test suite uses [pytest](https://docs.pytest.org/) and covers all modules (
|
|
89
|
+
The test suite uses [pytest](https://docs.pytest.org/) and covers all modules (580+ tests):
|
|
83
90
|
```bash
|
|
84
91
|
pip install -e ".[dev]"
|
|
85
92
|
python -m pytest tests/
|
|
@@ -103,4 +110,4 @@ This project is licensed under the MIT License. See the [LICENSE](LICENSE) file
|
|
|
103
110
|
|
|
104
111
|
## Acknowledgments
|
|
105
112
|
|
|
106
|
-
This library was created by [David J. Romano](https://
|
|
113
|
+
This library was created by [David J. Romano](https://davidromano.dev) by compiling and standardizing code from previous data analysis pipelines. 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 = "1.0
|
|
7
|
+
version = "1.2.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" }
|
|
@@ -23,7 +23,8 @@ dependencies = [
|
|
|
23
23
|
"requests",
|
|
24
24
|
"xraylib",
|
|
25
25
|
"pyyaml",
|
|
26
|
-
"ruamel.yaml"
|
|
26
|
+
"ruamel.yaml",
|
|
27
|
+
"pyFAI"
|
|
27
28
|
]
|
|
28
29
|
|
|
29
30
|
[project.optional-dependencies]
|
|
@@ -0,0 +1,6 @@
|
|
|
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, edges_from_centers
|
|
3
|
+
from .utils import enable_underscore_cleanup, au2invAngstroms, invAngstroms2au, keV2Angstroms, Angstroms2keV, q2theta, theta2q, element_number_to_symbol, element_symbol_to_number, translate_molecule, rotate_molecule, J4M, compress_ranges, expand_ranges
|
|
4
|
+
from .azimuthal import azimuthalBinning, compute_q_map, create_J4m_integrator, azimuthalBinning_pyfai
|
|
5
|
+
from . import theory
|
|
6
|
+
from . import calib
|