pyirena 0.3.3__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.
- pyirena/__init__.py +62 -0
- pyirena/batch.py +1874 -0
- pyirena/core/__init__.py +16 -0
- pyirena/core/data_merge.py +766 -0
- pyirena/core/distributions.py +609 -0
- pyirena/core/form_factors.py +644 -0
- pyirena/core/modeling.py +1110 -0
- pyirena/core/scattering_contrast.py +679 -0
- pyirena/core/simple_fits.py +983 -0
- pyirena/core/sizes.py +1207 -0
- pyirena/core/unified.py +636 -0
- pyirena/core/waxs_peakfit.py +1044 -0
- pyirena/examples/__init__.py +10 -0
- pyirena/examples/basic_demo.py +386 -0
- pyirena/gui/__init__.py +26 -0
- pyirena/gui/contrast_panel.py +1572 -0
- pyirena/gui/data_merge_panel.py +1594 -0
- pyirena/gui/data_selector.py +4136 -0
- pyirena/gui/hdf5viewer/__init__.py +32 -0
- pyirena/gui/hdf5viewer/collect_window.py +234 -0
- pyirena/gui/hdf5viewer/export.py +355 -0
- pyirena/gui/hdf5viewer/file_tree.py +398 -0
- pyirena/gui/hdf5viewer/graph_window.py +581 -0
- pyirena/gui/hdf5viewer/hdf5_browser.py +417 -0
- pyirena/gui/hdf5viewer/main_window.py +569 -0
- pyirena/gui/hdf5viewer/multi_collect_window.py +201 -0
- pyirena/gui/hdf5viewer/plot_controls.py +951 -0
- pyirena/gui/hdf5viewer/pyirena_readers.py +579 -0
- pyirena/gui/launch.py +27 -0
- pyirena/gui/modeling_panel.py +2570 -0
- pyirena/gui/sas_plot.py +660 -0
- pyirena/gui/simple_fits_panel.py +1439 -0
- pyirena/gui/sizes_panel.py +2583 -0
- pyirena/gui/unified_fit.py +3701 -0
- pyirena/gui/unified_fit_matplotlib_old.py +973 -0
- pyirena/gui/waxs_peakfit_panel.py +2183 -0
- pyirena/io/__init__.py +19 -0
- pyirena/io/contrast_io.py +373 -0
- pyirena/io/hdf5.py +873 -0
- pyirena/io/nxcansas_data_merge.py +242 -0
- pyirena/io/nxcansas_modeling.py +309 -0
- pyirena/io/nxcansas_simple_fits.py +281 -0
- pyirena/io/nxcansas_sizes.py +291 -0
- pyirena/io/nxcansas_unified.py +391 -0
- pyirena/io/nxcansas_waxs_peakfit.py +334 -0
- pyirena/io/results.py +347 -0
- pyirena/plotting/__init__.py +28 -0
- pyirena/plotting/plot_saxs.py +398 -0
- pyirena/plotting/unified_plots.py +397 -0
- pyirena/py.typed +1 -0
- pyirena/state/__init__.py +9 -0
- pyirena/state/state_manager.py +654 -0
- pyirena/tests/__init__.py +6 -0
- pyirena/tests/test_sizes.py +384 -0
- pyirena/tests/test_unified.py +172 -0
- pyirena-0.3.3.dist-info/METADATA +247 -0
- pyirena-0.3.3.dist-info/RECORD +61 -0
- pyirena-0.3.3.dist-info/WHEEL +5 -0
- pyirena-0.3.3.dist-info/entry_points.txt +6 -0
- pyirena-0.3.3.dist-info/licenses/LICENSE +21 -0
- pyirena-0.3.3.dist-info/top_level.txt +1 -0
pyirena/__init__.py
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"""
|
|
2
|
+
pyIrena: Python tools for small-angle scattering data analysis
|
|
3
|
+
|
|
4
|
+
This package provides comprehensive tools for analyzing SAXS/SANS/USAXS data,
|
|
5
|
+
including the Unified Fit model (Beaucage method) for hierarchical structures.
|
|
6
|
+
|
|
7
|
+
Modules:
|
|
8
|
+
core: Core analysis tools including the Unified Fit model
|
|
9
|
+
io: Data input/output utilities for HDF5/NXcanSAS files
|
|
10
|
+
plotting: Visualization and plotting functions
|
|
11
|
+
|
|
12
|
+
Example:
|
|
13
|
+
>>> from pyirena.core.unified import UnifiedFitModel
|
|
14
|
+
>>> model = UnifiedFitModel(num_levels=1)
|
|
15
|
+
>>> model.levels[0].Rg = 50.0
|
|
16
|
+
>>> results = model.fit(q_data, intensity_data)
|
|
17
|
+
|
|
18
|
+
Loading stored results example:
|
|
19
|
+
>>> from pyirena import load_result
|
|
20
|
+
>>> r = load_result("mydata.h5", "unified_fit")
|
|
21
|
+
>>> if r["found"]:
|
|
22
|
+
... print(f"chi² = {r['chi_squared']:.4f}")
|
|
23
|
+
>>> r = load_result("mydata.h5", "size_distribution")
|
|
24
|
+
>>> if r["found"]:
|
|
25
|
+
... print(f"Vf = {r['volume_fraction']:.4g}, method = {r['method']}")
|
|
26
|
+
|
|
27
|
+
References:
|
|
28
|
+
Beaucage, G. (1995). J. Appl. Cryst. 28, 717-728
|
|
29
|
+
Beaucage, G. (1996). J. Appl. Cryst. 29, 134-146
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
__version__ = "0.3.3"
|
|
33
|
+
__author__ = "Jan Ilavsky"
|
|
34
|
+
__email__ = "ilavsky@aps.anl.gov"
|
|
35
|
+
|
|
36
|
+
from pyirena.core.unified import UnifiedFitModel, UnifiedLevel, load_data_from_nxcansas
|
|
37
|
+
from pyirena.core.sizes import SizesDistribution
|
|
38
|
+
from pyirena.core.simple_fits import SimpleFitModel, MODEL_REGISTRY, MODEL_NAMES
|
|
39
|
+
from pyirena.batch import fit_unified, fit_sizes, fit_simple, fit_pyirena
|
|
40
|
+
from pyirena.io.results import load_result, SUPPORTED_ANALYSES
|
|
41
|
+
|
|
42
|
+
try:
|
|
43
|
+
from pyirena.plotting.plot_saxs import plot_saxs
|
|
44
|
+
except ImportError:
|
|
45
|
+
pass # matplotlib not installed
|
|
46
|
+
|
|
47
|
+
__all__ = [
|
|
48
|
+
"UnifiedFitModel",
|
|
49
|
+
"UnifiedLevel",
|
|
50
|
+
"load_data_from_nxcansas",
|
|
51
|
+
"SizesDistribution",
|
|
52
|
+
"SimpleFitModel",
|
|
53
|
+
"MODEL_REGISTRY",
|
|
54
|
+
"MODEL_NAMES",
|
|
55
|
+
"fit_unified",
|
|
56
|
+
"fit_sizes",
|
|
57
|
+
"fit_simple",
|
|
58
|
+
"fit_pyirena",
|
|
59
|
+
"load_result",
|
|
60
|
+
"SUPPORTED_ANALYSES",
|
|
61
|
+
"plot_saxs",
|
|
62
|
+
]
|